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

    Cardputer serial woes :-(

    Units
    3
    5
    2.9k
    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
      fentlewoodlewix
      last edited by

      i love my 2 cardputers, have been using them to make maths toys for my youngest kid. recently have run into a problem i dont know how to fix.

      on a razer laptop on ubuntu using the arduino toolchain i uploaded the following code:

      
      #include "M5Cardputer.h"
      
      typedef void (*thread_t)(); // define a simple type for a function pointer
      
      static int constexpr num_threads = 2;
      thread_t threads[num_threads];
      thread_t current_thread;
      
      void thread_01() 
      { 
        Serial.println("Thread 01");
      
        // M5Cardputer.Display.drawString("Thread 01",
        //                               M5Cardputer.Display.width() * 0.25,
        //                             M5Cardputer.Display.height() * 0.25 );
      
      } 
      
      void thread_02() 
      { 
        Serial.println("Thread 02");
      
        // M5Cardputer.Display.drawString("Thread 02",
        //                               M5Cardputer.Display.width() * 0.75,
        //                             M5Cardputer.Display.height() * 0.75 );
      
      } 
      
      void setup(){
      
        auto cfg = M5.config();
        M5Cardputer.begin(cfg);
        M5Cardputer.Display.setRotation(1);
        M5Cardputer.Display.setTextColor(GREEN);
        M5Cardputer.Display.setTextDatum(middle_center);
        M5Cardputer.Display.setTextFont(&fonts::FreeSans18pt7b);
        M5Cardputer.Display.setTextSize(1);
      
        Serial.begin(115200);
      
        threads[0] = &thread_01;
        threads[1] = &thread_02;
      
      }
      
      void loop() {
      
        Serial.println("Main Loop");
      
        M5Cardputer.Display.drawString("Hello",
                                        M5Cardputer.Display.width() / 2,
                                      M5Cardputer.Display.height() / 2 );
      
      
      
        for ( int n = 0; n< num_threads; n++) {
          threads[n]();
        }
      
      }
      

      now when i USB power the device it shows Hello in large friendly letters, but will not accept any new serial uploads from the ardulapino ide or from M5Burner. Though I can see the "Main Loop" text in the serial monitor of the IDE.

      Does anyone here know how to get back from this predicament?

      Thanks,
      Sean

      1 Reply Last reply Reply Quote 0
      • felmueF
        felmue
        last edited by

        Hello @fentlewoodlewix

        have you tried to manually set the ESP32S3 into download mode?

        From the documentation: 'To enter the download mode, press the G0 button on StampS3 at boot time.'

        Thanks
        Felix

        GPIO translation table M5Stack / M5Core2
        Information about various M5Stack products.
        Code examples

        L 1 Reply Last reply Reply Quote 0
        • F
          fentlewoodlewix
          last edited by

          It works now, thank you!
          (I had forgotten about that option)

          1 Reply Last reply Reply Quote 0
          • L
            loscuras2 @felmue
            last edited by

            @felmue Hello, even if i follow this commands for me still not working.

            1 Reply Last reply Reply Quote 0
            • felmueF
              felmue
              last edited by

              Hello @loscuras2

              have you tried a different USB cable?

              Thanks
              Felix

              GPIO translation table M5Stack / M5Core2
              Information about various M5Stack products.
              Code examples

              1 Reply Last reply Reply Quote 0
              • First post
                Last post