how to connect nRF24l01 with ESP8266 NodeMCU

Varun's picture

Offline

Joined: Sep 13, 2018

Replies: 0
how to connect nRF24l01 with ESP8266 NodeMCU
July 24, 2019 - 5:40pm

i am trying to connect the nodemcu with nRF24l01 similar to Arduino UNO interfacing with nRF24l01. i am using the same RF24.h library. The question here is when i try to replace the function parameter RF24 radio(9, 10); with RF24 radio(D5, D6); for ESP8266. Here D5 is CE and D6 is CSN, it gives me following error:

exit status 1
unable to find numeric literal operator 'operator"" D'​

Can someone help me eleiminate this error and also in interfacing the nRF24l01 with ESP8266 Nodemcu. 

any lead would be appreciated

Abhiemanyu Pandit's picture

Offline

Joined: Jan 21, 2019

Replies: 42
how to connect nRF24l01 with ESP8266 NodeMCU
July 24, 2019 - 5:46pm

the pins you are trying to input in the fucntion won't accept the D as it is not defined as charcter. it only accepts integer. So try this, 

NRF               ESP-12E
CSN ---------------- D8
MOSI --------------- D7
MISO --------------- D6
SCK ---------------- D5
CE ------------------ D4

and replace the fucntion with RF24 radio(2, 15); where 2 is CE and 15 is CSN for ESP8266