Serial not working with M5Unified on AtomS3
-
Hi,
I am using M5Unified on my AtomS3 but can't get
Serial.println("hello")to show up on the host. I configured the baud rate correctly and things worked on a previous project without M5Unified on an AtomLite. I guess I am missing something obvious here.Any help welcomed.
Marc
-
@frameworklabs This worked for me with my cute AtomS3!
#include <M5Unified.h> void setup() { M5.begin(); Serial.begin(115200); M5.Lcd.fillScreen(BLACK); delay(100); } void loop() { Serial.println("loop"); M5.update(); M5.Lcd.setTextColor(RED); M5.Lcd.setTextSize(2); M5.Lcd.setCursor(25, 15); M5.Lcd.print("RED"); M5.Lcd.setTextColor(BLUE); M5.Lcd.setTextSize(2); M5.Lcd.setCursor(18, 50); M5.Lcd.print("BLUE"); M5.Lcd.setTextColor(GREEN); M5.Lcd.setTextSize(2); M5.Lcd.setCursor(15, 90); M5.Lcd.print("GREEN"); delay(100); }But with Tools setting: USB CDC on Boot 'enabled'
-Terry -
Thanks @teastain for the hint with USB CDC on Boot!
I forgot to mention that I am on PlatformIO but the snippet shown below added to the platform.ini file helped me to solve the problem. Previously I didn't had to specify any build_flags to see the Serial output, so maybe this is a change introduced by PlatformIO.
monitor_speed = 115200 build_flags = -D ARDUINO_USB_MODE=1 -D ARDUINO_USB_CDC_ON_BOOT=1Best
Marc
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login