Author Topic: Extended RFM69 lib - functions added  (Read 13599 times)

john k2ox

  • Full Member
  • ***
  • Posts: 111
Re: Extended RFM69 lib - functions added
« Reply #15 on: October 01, 2013, 04:34:48 PM »
Yes, you are correct.

This is my first time using classes with Arduino.

You put your new class between your sketch and Felix's. 

Your sketch references your lib(class) and your sketch's function calls look in your lib(after looking in the sketch).   If it can't find it in your lib it will look in Felix's,  because your lib will have a reference to his (#include rfm69.h).

Google C++ classes.

john

bstott

  • NewMember
  • *
  • Posts: 37
Re: Extended RFM69 lib - functions added
« Reply #16 on: October 01, 2013, 05:26:40 PM »
Using Arduino IDE 1.0.5 and Moteino w/RFM69HW,

OK - My thinking checks out correctly. Now, what is missing with my installation?

I installed your RFM69NEW.h/.cpp into the Arduino libraries as I have many others. I restarted the IDE and verified that it's in the library manager list. When your example sketch is opened the RFM69NEW.h library is not highlighted like the others. I attempt to compile and upload then, get the following errors (I apologize if it is simple - My brain is fried. I just spent hours chasing another simple issue.):

[Note also: I do not see the highpower line for the RFM69HW so I will likely have to add that but, I am just trying to compile correctly.]

Arduino - BARF:
In file included from rfm69_registers.ino:8:
C:\Users\Dad\Documents\Arduino\libraries\RFM69NEW/RFM69NEW.h:19: error: expected class-name before '{' token
C:\Users\Dad\Documents\Arduino\libraries\RFM69NEW/RFM69NEW.h:21: error: expected `)' before 'slaveSelectPin'
C:\Users\Dad\Documents\Arduino\libraries\RFM69NEW/RFM69NEW.h:25: error: 'byte' has not been declared
C:\Users\Dad\Documents\Arduino\libraries\RFM69NEW/RFM69NEW.h:29: error: 'byte' does not name a type
C:\Users\Dad\Documents\Arduino\libraries\RFM69NEW/RFM69NEW.h:31: error: 'byte' has not been declared
rfm69_registers.ino: In function 'void setup()':
rfm69_registers:27: error: 'class RFM69NEW' has no member named 'initialize'
rfm69_registers:27: error: 'RF69_433MHZ' was not declared in this scope
rfm69_registers:30: error: 'class RFM69NEW' has no member named 'setHighPower'
rfm69_registers:32: error: 'RF69_868MHZ' was not declared in this scope
rfm69_registers.ino: In function 'void loop()':
rfm69_registers:57: error: 'class RFM69NEW' has no member named 'readAllRegs'
rfm69_registers:64: error: 'class RFM69NEW' has no member named 'readTemp'



john k2ox

  • Full Member
  • ***
  • Posts: 111
Re: Extended RFM69 lib - functions added
« Reply #17 on: October 01, 2013, 06:54:59 PM »
Are all the original lib files plus the new ones in the same lib directory? They should be.

bstott

  • NewMember
  • *
  • Posts: 37
Re: Extended RFM69 lib - functions added
« Reply #18 on: October 02, 2013, 04:54:13 PM »
I re-installed IDE. Other examples work. I get the same error again.