Description
Board
ESP32C3M1
Device Description
Hardware Configuration
GPIO 18 & 19 are connected to USB. USB is used to program the device and to monitor Serial.print output.
Version
v2.0.3
IDE Name
Arduino
Operating System
MacOS 10.15.7
Flash frequency
40Mhz
PSRAM enabled
yes
Upload speed
115200
Description
USB is used to program the device and to monitor Serial.print output. However, when the device is unplugged, and the Serial.print() lines are left in the code, they cause delays of a second or so. Plugging back in will make the delays go away. If I remove the Serial.print() lines, it makes the delays disappear too.
Sketch
#include <Wire.h>
#include <Adafruit_NeoPixel.h>
#define LED_PIN 6
#define NEOPIXEL_PIN LED_PIN
Adafruit_NeoPixel pixels(1, NEOPIXEL_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
pixels.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
Serial.print("Red... ");
// drawMessage("Test Red LED");
pixels.setPixelColor(0, pixels.Color(64, 0, 0));
pixels.show();
delay(500);
Serial.print("Green... ");
// drawMessage("Test Green LED");
pixels.setPixelColor(0, pixels.Color(0, 64, 0));
pixels.show();
delay(500);
Serial.print("Blue... ");
// drawMessage("Test Blue LED");
pixels.setPixelColor(0, pixels.Color(0, 0, 64));
pixels.show();
delay(500);
Serial.print("White... ");
// drawMessage("Test Whitish LED");
pixels.setPixelColor(0, pixels.Color(64, 64, 64));
pixels.show();
delay(500);
Serial.print("Off... ");
pixels.clear();
pixels.show();
delay(500);
Serial.println("Done. Looping");
}```
Debug Message
There is no debug or error message.
Other Steps to Reproduce
Run the sketch. While the device is plugged into a computer with Arduino, the lights flash faster. When you unplug the USB cable the lights slow down.
With more or longer Serial.print output, the delay can be more than a second.
That same code above is running on the two boards in this video. When you plug the USB in, you can see that the flash rate increases on the one plugged in.
IMG_7923.mov
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.
Metadata
Metadata
Assignees
Type
Projects
Status