error: could not convert 'radio.RF24::read

help me I do not know why my code does not want to work

my Error :

: error: could not convert ‘radio.RF24::read(((void*)(& RGB)), 4)’ from ‘void’ to ‘bool’

if ( !, sizeof(unsigned long)) ) {


nrf24L01__led-strip:44:49: error: in argument to unary !

could not convert ‘radio.RF24::read(((void*)(& RGB)), 4)’ from ‘void’ to ‘bool’

nrf24L01__led-strip.ino (2.36 KB)

Error.txt (345 Bytes)

It looks to me like the read method does not return a value? (ie, returns void) So it's an error that you are testing the value as if it returned a bool.

Moved your topic to a mores suitable section.

You may want to READ THIS for future reference.
It will help you get the best out of the forum.


There are a couple versions of the RF24 library. One has the read() method that returns a bool, the other returns nothing (void). Use the examples that come with the library that you have installed.