RFM69 temperature and how to check RFM69 is set to high power
I am using RFM69HW and found how to use high power reading this post. I am now want to get the RFM69 temperature in my sketch and check if I am using high power mode.
I found in the RFM69 library useful methods, but I don't know how to call them in my sketch ... I tried radio.readTemperature but it's not correct.
Do you have an idea ?
I am also interesting in getting the RSSI !
Guess you would have to add something like this in your sketch:
extern RFM69 _radio;
And use use
(in the development branch)
In 1.5 the radio-object is a private member of the MySensors radio-driver class so you'd have to make it public to have access to it.
Thanks @hek !
I modified the file "MyTransportRFM69.h" and moved
RFM69 radiofrom private to public.
I then added
extern RFM69 _radio;in my sketch.
And in the loop method, I also added
But the compilation failed:
SerialGateway.cpp.o: In function `loop': /Users/carlierd/SerialGateway.ino:130: undefined reference to `_radio' /Users/carlierd/SerialGateway.ino:130: undefined reference to `_radio' collect2: error: ld returned 1 exit status
For the moment I prefer using the stable branch until I get something working.
You're mixing the two solutions.
In 1.5 you would reach the public radio object by
Sorry @hek but it's still not clear for me
I am using 1.5, so I assume that I have to:
- put radio as public in MyTransportRFM69.h
- add radio.radio.readTemperature() in my sketch
Yep, should work.
I got this error during compilation:
SerialGateway.ino: In function 'void loop()': SerialGateway:128: error: 'radio' was not declared in this scope 'radio' was not declared in this scope
Any idea ?
transport.radio.getTemperature() then? O
It's perfect !! Thanks !