Hello, i am struggling with a spi connection between a ESP32-S3-DevKitC-1 (Master) and a ESP32 C3 Super Mini (Slave)
My Code:
#include <Arduino.h>
#include <SPI.h>
#define SCLK 4
#define MISO 5
#define MOSI 6
#define SS 7
void setup()
{
Serial.begin(115200);
pinMode(SS, OUTPUT);
SPI.begin(SCLK, MISO, MOSI, SS);
SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE0));
}
void loop()
{
digitalWrite(SS, LOW);
byte dataToSend = 0x42;
byte receivedData = SPI.transfer(dataToSend);
digitalWrite(SS, HIGH);
delay(1000);
}
#include <Arduino.h>
#include <SPI.h>
#define SCLK 4
#define MISO 5
#define MOSI 6
#define SS 7
volatile byte receivedData;
volatile bool dataReceived = false;
void setup()
{
Serial.begin(115200);
pinMode(SS, INPUT_PULLUP);
pinMode(MISO, OUTPUT);
SPI.begin(SCLK, MISO, MOSI, SS);
SPI.beginTransaction(SPISettings(1000000, MSBFIRST, SPI_MODE0));
}
void loop()
{
if(digitalRead(SS) == LOW)
{
receivedData = SPI.transfer(0x00);
Serial.print("receives data: ");
Serial.println(receivedData, HEX);
}
}
I tried it in ArduinoIDE with the boards selected:
"ESP32S3 Dev Module" and "Nologo ESP32C3 Super Mini"
in the Serial Terminal i just receive 0
I also tried it in Visual Studio Code with the Platformio extension, i selected:
"esp32-s3-devkitc-1" and "seeed_xiao_esp32c3"
i got the same result
i connected the grounds and pins 4-7 together on the boards.
would be nice if someone could help me.

