MySensor.h conflict with RF24.h?
-
My goal is simply to Xmit the battery voltage and moisture sensor data from one Pro Mini (with RF24) to another Pro Mini (also with a RF24 radio), not using gw calls. My receiving Pro Mini will simply control a relay.
I'm trying to combine two example sketches:
- Plant_Moisture_Sensor_Low_Power
- Arduino RF24XmitExample
#include <SPI.h>
#include <MySensor.h>
#include "RF24.h"However, I'm getting compile errors. There seems to be a conflict between the MySensor gw library calls and the RF24 library calls.
The first of many compile errors I get are:
C:\Users\Dieter\AppData\Local\Temp\build3316808d9e952884aa2dded546ad6403.tmp\libraries\RF24\RF24.cpp.o: In function `SPIClass::setBitOrder(unsigned char)':C:\Users\Dieter\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.11\libraries\SPI\src/SPI.h:293: multiple definition of `RF24::csn(bool)'
In the end, I get: Exit status 1
Error compiling for board Arduino Pro or Pro Mini.Both examples individually compile OK.
Any thoughts?
Dieter -
I forgot to mention I only use the gw libary to put the 3.3v Mini to sleep.
-
When using the GW library, is there a way to communicate from one node to another, without having to go thru a controller?
I have read some of the 1.5 API, but I cant really tell if this can be done.
What about the LowPower.h library. Does it put the Radio to sleep?
-
What can i use to create an interrupt to wake a sleeping Arduino?
This using your Plant_Moisture_Sensor sketch. -
When using the GW library, is there a way to communicate from one node to another, without having to go thru a controller?
I have read some of the 1.5 API, but I cant really tell if this can be done.
What about the LowPower.h library. Does it put the Radio to sleep?
@y4CdW42Ol8 said:
When using the GW library, is there a way to communicate from one node to another, without having to go thru a controller?
I have read some of the 1.5 API, but I cant really tell if this can be done.
Yes. Use setDestination on the message, see https://www.mysensors.org/download/sensor_api_15#the-full-api
What about the LowPower.h library. Does it put the Radio to sleep?
To my knowledge, LowPower.h is the rocketscream lowpower library. So no, it does not.
-
What can i use to create an interrupt to wake a sleeping Arduino?
This using your Plant_Moisture_Sensor sketch.@y4CdW42Ol8 said:
What can i use to create an interrupt to wake a sleeping Arduino?
This using your Plant_Moisture_Sensor sketch.A timer (whick my sketch alreay uses) or a change in an interrupt pin, see the Sleeping section on https://www.mysensors.org/download/sensor_api_15#the-full-api and http://playground.arduino.cc/Code/Interrupts
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login