ESP32C3 Super Mini doen't communicate with Serial Monitor in one setup, but it does in another setup -- why?

1. My ESP32 Super Mini Dev Board (Fig-1) accepts sketch from PC, but it does not communicate with Serial Monitor (Bd = 9600) though the onBoard LED (at GPIO8) blinks.
image
Figure-1:

Setup-1:
Board: "ESP32C3 Dev Module"
USB CDC on Boot: "Enabled"
Port: "COM13 (ESP32S3 Dev Module)" //no other option

Sketch:

#define LED_BUILTIN 8
char myData[10];

void setup() 
{
  Serial.begin(9600);
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() 
{
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);    
  byte n = Serial.available();
  if (n != 0)
  {
    byte m = Serial.readBytesUntil('\n', myData, sizeof (myData)-1);
    myData[m] = '\0';
    Serial.println(myData);
  }
  Serial.println("Hello");
}

2. The following setup has solved the problem.
Setup-2:
Board: "LOLIN C3 Mini"
USB CDC on Boot: "Enabled"
Port: "COM13 (ESP32S3 Dev Module)"
Bd = 9600

3. Output:

Hello
Hello
Arduino   //From InputBox of SM to ESP32C3 to OutputBox of SM
Hello
Hello

4. Would be glad to hear your opinion as to -- "what is LOLIN C3".

2 Likes

Hi, I have made this beast work with WIFI Manager and web interface for making the connection with SERVO. STill callibration with Servo is bit of issue. I already fried one by mistake lol.
make use of PlatformIO, little more control on the board is available.

This is the setup I am making use of:

platform = espressif32
board = esp32-c3-devkitc-02
framework = arduino
lib_deps = 
	LittleFS
	https://github.com/alanswx/ESPAsyncWiFiManager.git
	https://github.com/esphome/ESPAsyncWebServer.git
	ayushsharma82/ElegantOTA @ ^3.1.0
	bblanchon/ArduinoJson @ ^7.0.3
	madhephaestus/ESP32Servo @ ^1.1.2

monitor_speed = 115200
board_build.filesystem = littlefs
build_flags = 
	-D ARDUINO_USB_CDC_ON_BOOT=1
	-D ARDUINO_USB_MODE=1
	-fpermissive
	-DELEGANTOTA_USE_ASYNC_WEBSERVER=1
	-DESPWifiManualSetup=true
	-DBOARD_HAS_PSRAM

board_build.f_cpu = 160000000L
board_build.mcu = esp32c3
board_build.partitions = tinyuf2-partitions-4MB.csv
board_build.flash_mode = dio

Use of WifiManager is pretty slow and doesn't work cosistently. It works well with the pre-setup WIFI SSID and its passwd.

hope that help,
Jag

1 Like

LOLIN is a Module brand that is very stable and reliable. The most likely reason this configuration worked for your is the CDC enabled on boot, which is the on chip USB interface. One note too the LOLIN C3mini uses the ESP32C3HN4 chip instead of the FN4 chip. The H variant has a higher chip temperature tolerance than the F. Not a big issue for the hobbyist, but very important in an industrial application.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.