🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Serial not working with M5Unified on AtomS3

    Scheduled Pinned Locked Moved Arduino
    3 Posts 2 Posters 4.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F Offline
      frameworklabs
      last edited by

      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

      teastainT 1 Reply Last reply Reply Quote 0
      • teastainT Offline
        teastain @frameworklabs
        last edited by teastain

        @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

        Cheers, Terry!

        100% M5Stack addict with several drawers full of product!

        F 1 Reply Last reply Reply Quote 1
        • F Offline
          frameworklabs @teastain
          last edited by

          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=1
          

          Best
          Marc

          1 Reply Last reply Reply Quote 1

          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
          • First post
            Last post