SRJ
1
Hello Experts,
I am trying to use NRF24L01 with ESP32 & had uploaded below code in ESP...
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(5, 19); // CE, CSN
void setup() {
Serial.begin(115200);
radio.begin();
radio.openWritingPipe(0x7878787878LL); // Set the receiver address
radio.openReadingPipe(1, 0x6767676767LL); // Set the sender address
radio.startListening();
}
void loop() {
char sendText[] = "Hello, receiver!"; // Message to send
radio.write(&sendText, sizeof(sendText));
if (radio.available()) {
char receiveText[32] = "";
radio.read(&receiveText, sizeof(receiveText));
Serial.println("Received: " + String(receiveText));
}
delay(1000);
}
I am getting below message in my Serial monitor.
Will anyone tell me why is this happening & what can I do to prevent this.
rst:0x8 (TG1WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0x044c2028
invalid header: 0x044c2028
invalid header: 0x044c2028
invalid header: 0x044c2028
invalid header: 0x044c2028
invalid header: 0x044c2028
invalid header: 0x044c2028
invalid header: 0x044c2028
invalid header: 0x044c2028
invalid header: 0x044c2028
invalid header: 0x044c2028
invalid header: 0x044c2028
invalid header: 0x044c2028
invalid header: 0x044c2028
invalid header: 0x044c2028
invalid header: 0x044c2028
invalid header: 0x044c2028
invalid header: 0x044c2028
invalid heaets Jul 29 2019 12:21:46
The connections I did are as below:
NRF -> ESP
VCC -> 3.3V
GND -> GND
CE -> GPIO (e.g., GPIO5)
CSN -> GPIO (e.g., GPIO19)
SCK -> GPIO (e.g., GPIO18)
MOSI -> GPIO (e.g., GPIO23)
MISO -> GPIO (e.g., GPIO32)
Kindly help me with my issue...
Thanks!!!
J-M-L
2
don't use pastebin, very few of the helpers here will follow a link to an external site.
Just post code here using code tags.
SRJ
3
Thanks for your concern & suggestion.
I had updated my responce馃檪
SRJ
5
Can you tell me how can I define them in the code?
J-M-L
6
#include <SPI.h>
#include "nRF24L01.h"
#include "RF24.h"
RF24 radio(4, 5);
SRJ
7
I have connected as you told.
But still same issue...
J-M-L
8
what's you ESP32 exactly ? link to model / picture
SRJ
10
I also tried using other ESP32 & some.other available codes...
Still same responce....
J-M-L
11
it's likely due to the fact that the RF24 library uses the standard SPI bus and this one is needed by the ESP32 for flash memory access
see [Question] How to use ESP32 HSPI 路 Issue #722 路 nRF24/RF24 路 GitHub for using HSPI instead
SRJ
12
I checked the link & added suggested line in code & also changed the connections according to it....
Now I am not getting that error...
Thanks & Regards!!!
SRJ
14
It didn't....
Actually the issue was different...
After lot headache I found that the ESP32 I used had different pinot-out from the ESP32 which I regularly use...
So because of this the connections I did were wrong...
I tried again with the ESP32 which I regularly use & it worked well with it.....
But still the NRF modules are unable to communicate with each other...
I think they may be damaged because of wrong connections....
Thanks for your help & guidance...
system
Closed
15
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.