henryk / openmili

Open implementation of the Mi-Light 2.4GHz LED light control protocol
GNU General Public License v3.0
105 stars 33 forks source link

PL1167_nRF24.h + ESP32 ( pipe[] issue ) #14

Open vult-r opened 3 years ago

vult-r commented 3 years ago

Does anyone know how to get PL1167_nRF24 to work with ESP32?

Everything goes, except that pipe[] value in PL1167_nRF24.cpp was already declared in the hardware files of ESP32: static const uint8_t pipe[] = {0xd1, 0x28, 0x5e, 0x55, 0x55}; _'const uint8t pipe []' redeclared as different kind of symbol

I simply renamed the pipe[] value and this will compile and execute, the code seems to receive milight packets but rather unstable and in long bursts ( not parsing the end properly? )

(Using arduino IDE + ESP32 + latest version of RF24 library)

vult-r commented 3 years ago

ah i could just remove the pipe[] line from the library, it did not seem to matter at all finally i found the steady wiring and now it just works , with 17 as CE and 5 as CSN

#define           CE_PIN  17   //  2 esp8266 ,  9 arduinoUNO , 17 ESP32
#define           CSN_PIN 5   // 15 esp8266 , 10 arduinoUNO ,  5 ESP32

RF24              radio( CE_PIN, CSN_PIN );
PL1167_nRF24      prf( radio );
MiLightRadio      mlr( prf );

( this is closed i think )