Looking for some basic TX/Rx example code to get me started !
There are various libraries for Arduino (e.g Radiohead looks promising ) anyone ?
( RF solutions only supply UART example , which is fine and describes data packets etc) , but unsure how to get started with SPI on this ( RF solutions do not supply a SPI example, but I am writting to them )
which specific ESP32-S2 module?
maybe worth running esp32-spi-communication which will display the default SPI pins
I don't have a ESP32-S2 but my ESP32-S3-DevKitC-1 displays
probably worth trying the UART interface first as it is probably the simplest - see ZETAPLUS-Example-Instructions-(UART)
this is a test of Serial1 for the ESP32-S3 but may help with ESP32-S2
// ESP32-S3 DevkitC-1 Serial1 test - for loopback test connect pin GPIO17 U1TXD to pin GPIO18 U1RXD"
// ss https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/_images/ESP32-S3_DevKitC-1_pinlayout_v1.1.jpg
#define RXD1 18
#define TXD1 17
void setup() {
// initialize both serial ports:
Serial.begin(115200);
Serial1.begin(9600, SERIAL_8N1, RXD1, TXD1);
Serial.println();
Serial.println("\n\nESP32-S3 DevkitC-1 serial1 test pin GPIO17 U1TXD pin GPIO18 U1RXD");
Serial.write(" for loopback test connect pin GPIO17 U1TXD to pin GPIO18 U1RXD\n");
}
void loop() {
// read from port 1, send to port 0:
if (Serial1.available()) {
int inByte = Serial1.read();
Serial.write(inByte);
}
// read from port 0, send to port 1:
if (Serial.available()) {
int inByte = Serial.read();
//Serial.write(inByte);
Serial1.write(inByte);
}
}