My digital weather station is now up and running (thanks again to all those forum members who helped me with the problems i encountered while building it)
I now wish to move on to the next phase of the weather station project, which is to make it send it's data by WI - FI (I currently of course have to take the data by going outside to collect the data, would be nice to stay in the warm indoors and collect the data.)
I have started by using Arduino UNO + Servo + NRF24L01 modules, i have used sketches from an Instructables web site, the transmitter sketch uploaded first time, the problem i have is with the receiver sketch, i get this error message "void value not ignored as it ought to be" having scoured the internet for days now, and getting nowhere, i thought i need help to point me in the right direction to correct the error.
the line "done = radio.read(msg,1);" is highlighted in the IDE, so i reckon it's this line which is wrong, i also noticed that in this line it has msg.1 with parenthesis, while the next line uses both parentheses and squared brackets ???
There are several versions of the RF24. Some versions have read() return a boolean. Some do not. Your code must match the version you are using. Your code does not.
The servo is just there for me to practice with using Tx & Rx, it's a bit difficult to get the weather station back into my house as it's so big and heavy.
Once you establish that you have radio communications though, you're going to need to think about a protocol so that the two ends can agree what's being sent. What measurements do you plan to send to the hardware indoors?
/**
* Read the available payload
*
* The size of data read is the fixed payload size, see getPayloadSize()
*
* @note I specifically chose 'void*' as a data type to make it easier
* for beginners to use. No casting needed.
*
* @note No longer boolean. Use available to determine if packets are
* available. Interrupt flags are now cleared during reads instead of
* when calling available().
*
* @param buf Pointer to a buffer where the data should be written
* @param len Maximum number of bytes to read into the buffer
*
* @code
* if(radio.available()){
* radio.read(&data,sizeof(data));
* }
* @endcode
* @return No return value. Use available().
*/
void read( void* buf, uint8_t len );
The read method in that library returns a void, not a bool.
while(radio.available() ){ // If an ack with payload was received
radio.read( &gotByte, 1 ); // Read it, and display the response time