Hello, I am using esp32-s3-devkitc-1-n16r8v board to program a nrf24l01+pa+lna module. This module works as on the ESP32 Devkit V1 it works. The connections are done properly and the power supply is steady.
This is a code issue which I am unable to solve.
I need help configuring the SPI as it won't even read my module through this test as shown in the code below. I have no need for specific (FSPI,HSPI).
I have tried the code on multiple esp32-s3-devkitc-1-n16r8v board which is why it is a coding issue. Please end my suffering as I've spent countless hours trying to figure out how to make the SPI work.
/*
SCK -> GPIO 12 (pin 11)
MISO -> GPIO 13 (pin 12)
MOSI -> GPIO 11 (pin 10)
CE -> GPIO 10 (pin 9)
CSN -> GPIO 9 (pin 46)
*/
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <printf.h>
const int sck = 12;
const int miso = 13;
const int mosi = 11;
const int ss = 10;
const int ce = 9;
RF24 radio(ce, ss);
const byte thisSlaveAddress[5] = { 'R', 'x', 'A', 'A', 'A' };
SPIClass spi2(FSPI);
void setup() {
Serial.begin(115200);
printf_begin();
spi2.begin(sck, miso, mosi, ss);
Serial.println("CheckConnection Starting");
Serial.println();
Serial.println("FIRST WITH THE DEFAULT ADDRESSES after power on");
Serial.println(" Note that RF24 does NOT reset when Arduino resets - only when power is removed");
Serial.println(" If the numbers are mostly 0x00 or 0xff it means that the Arduino is not");
Serial.println(" communicating with the nRF24");
Serial.println();
radio.begin();
radio.printDetails();
Serial.println();
Serial.println();
Serial.println("AND NOW WITH ADDRESS AAAxR 0x41 41 41 78 52 ON P1");
Serial.println(" and 250KBPS data rate");
Serial.println();
radio.openReadingPipe(1, thisSlaveAddress);
radio.setDataRate(RF24_250KBPS);
radio.printDetails();
Serial.println();
Serial.println();
if (radio.isChipConnected()) {
Serial.println("Transmitter NF24 connected to SPI");
} else {
Serial.println("\n\nNF24 is NOT connected to SPI");
}
}
void loop() {
}
I have reverted the version as you told me to 2.0.17
now I do have an output on the serial monitor but still having issues.
The pins Im using as I listed in the code of my post are still the same and I made sure that physically they're correct.
Good to see the sketch is ;working' now, but that is as much as I can do. If you are using a breadboard there are two common errors, the first is many/most breadboards have connection issues, the second is it is easy to put the wire in the wrong hole, double check with a VOM. Good luck.
I solved it.
The problem was on the esp32-s3-devkitc-1-n16r8v (Specifically: YD-ESP32-22 2022-v1.3)
The GPIO no. is the Pin no. i.e: GPIO 12 is Pin 12.
I have no clue if this is due to the arduino library or the model itself, but it was solved by trying out same GPIO xx to PIN xx.
For any future members reading this, always give this dumb big brain move a go ;x