SmartRC-CC1101-Driver-Lib
SmartRC-CC1101-Driver-Lib copied to clipboard
Arduino nano ESP32 not working
Hello, I have different boards:
- ESP32-WROOM-32
- Adafruit ESP32-S3 Feather
- Arduino Nano ESP32
- More Arduinos (Due, UNO R4 Wifi)
I know that the library is not working in the Arduino Due and UNO R4 Wifi, but I thought it would work in all ESP32 boards, including the Nano. My concern is that while I have no problems with the pin configuration when using the WROOM and the Adafruit, I have an infinite loop of restarts when using the Arduino Nano. At least in the other Arduinos, I can run the program without restarting, even if it’s not working well.
I would like to find an answer to this issue because the Nano has the same internal architecture as the other ESP32 boards. I have consciously checked all the pin setups and everything seems to be OK.
Here is my configuration:
[env:arduino_nano_esp32]
platform=espressif32
board=arduino_nano_esp32
framework=arduino
lib_extra_dirs=~/Documents/Arduino/libraries
build_flags=
${common.build_flags}
-D MICROCONTROLLER=ARDUINO_NANO_ESP32
-D _SCK_PIN=5
-D _MISO_PIN=6
-D _MOSI_PIN=7
-D CSN_PIN=8
-D TX_PIN_GDO=9
-D RX_PIN_GDO2=10
-D BLINK_LED=20
-D MONITOR_SPEED=9600
monitor_speed=9600
and this is the setup code:
Serial.begin(MONITOR_SPEED);
delay(2000);
Serial.println("Initializing...");
Serial.println("CS1101 | SCK = 5 | MISO = 7 | MOSI = 6 | CSN = 4 | GDO = 3 tx | GDO2 = 8 rx |");
ELECHOUSE_cc1101.setSpiPin(_SCK_PIN, _MISO_PIN, _MOSI_PIN, CSN_PIN);
ELECHOUSE_cc1101.setGDO(TX_PIN_GDO, RX_PIN_GDO2);
Serial.printf("MICROCONTROLLER MAPPING | SCK = %d 3.3v purple | MISO = %d green | MOSI = %d yellow 3.3v | CSN = %d orange 3.3v | GDO = %d blue | GDO2 = %d grey |", _SCK_PIN, _MISO_PIN, _MOSI_PIN, CSN_PIN, TX_PIN_GDO, RX_PIN_GDO2);
Serial.println();
pinMode(BLINK_LED, OUTPUT);
For example, this is the setup for one board that works well:
[env:adafruit_feather_esp32s3]
platform=espressif32
board=adafruit_feather_esp32s3
framework=arduino
lib_extra_dirs=~/Documents/Arduino/libraries
lib_deps=FS
build_flags=
${common.build_flags}
-D MICROCONTROLLER=ADAFRUIT_FEATHER_ESP32S3
-D _SCK_PIN=6
-D _MISO_PIN=9
-D _MOSI_PIN=10
-D CSN_PIN=11
-D TX_PIN_GDO=12
-D RX_PIN_GDO2=13
-D BLINK_LED=4
-D MONITOR_SPEED=460800
monitor_speed=460800
Could you help me understand the reason? I would like to use the Nano board because of its size for my project.
Thank you :)