Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. fentlewoodlewix
    F
    • Continue chat with fentlewoodlewix
    • Start new chat with fentlewoodlewix
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    fentlewoodlewix

    @fentlewoodlewix

    0
    Reputation
    3
    Posts
    136
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    fentlewoodlewix Follow

    Posts made by fentlewoodlewix

    • RE: M5Cardputer & MicroPython

      Hello NYCMS, WOuld you mind pointing me the tutorial or similar you used to get your VSCode and Arduino CLI toolchain working?
      Thanks.

      posted in Micropython
      F
      fentlewoodlewix
    • RE: Cardputer serial woes :-(

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

      posted in Units
      F
      fentlewoodlewix
    • Cardputer serial woes :-(

      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

      posted in Units
      F
      fentlewoodlewix