Navigation

    M5Stack Community

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

    sambartle

    @sambartle

    Software Engineer in the UK

    3
    Reputation
    6
    Posts
    765
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Location UK

    sambartle Follow

    Posts made by sambartle

    • RE: M5Paper sd card issues

      @yellowelise

      You have to do / when referencing the root in Arduino SD libraries..

      I've modified your example to output to the screen instead of serial and fixed it for you.. (I left the syntactically redundant exists, try create anyways, exists code in as that's what the original example did, it probably needs another if)

      #include <M5EPD.h>
      
      M5EPD_Canvas canvas(&M5.EPD);
      
      File myFile;
      void setup(void)
      {
        M5.begin();
        M5.EPD.SetRotation(90);
        M5.EPD.Clear(true);
        M5.RTC.begin();
        canvas.createCanvas(540, 400);
        canvas.setTextSize(3);
      
      
        bool ret = SD.begin(4, SPI, 20000000);
        if(ret == false)
          canvas.drawString("SD ERROR...", 45, 100);
        else  
        {
          canvas.drawString("SD OK...", 45, 100);
          if (SD.exists("/screen.txt"))
            canvas.drawString("Screen.txt Exists...", 45, 150);
          else
            canvas.drawString("Screen.txt Not Exists...", 45, 150);
          canvas.drawString("Try create Screen.txt", 45, 200);
          myFile = SD.open("/screen.txt", FILE_WRITE);
          myFile.println("Some text...");
          myFile.close();
          if (SD.exists("/screen.txt"))
            canvas.drawString("Screen.txt Exists...", 45, 250);
          else
            canvas.drawString("Screen.txt Still Not Exists...", 45, 250);
        }
      
        canvas.pushCanvas(0,0,UPDATE_MODE_DU4);
      }
      
      void loop(void)
      {
      
      }
      
      posted in PRODUCTS
      sambartle
    • RE: 10 min battery life

      It's confusing to tell if its fully charged using the example code as the battery icon is just calculated by looking at voltage.. so it'll jump to 100% quickly after the USB-C is connected.

      It will not however be full though. (the voltage is increased by the USB not by the battery being charged)

      Leave it charging for a few hours.

      posted in Cores
      sambartle
    • RE: M5STACK AC Socket - Rebuild

      I#d love to see this in international versions with a compliant socket.. (the one shown here is not acceptable in the UK)

      posted in Features Wish List
      sambartle
    • RE: M5Paper Canvas not working in Arduino IDE

      To go full circle and solve the issue... Are you using platformio rather than arduino?

      You need to add:

      # Name,   Type, SubType, Offset,  Size, Flags
      nvs,      data, nvs,     0x9000,  0x5000,
      otadata,  data, ota,     0xe000,  0x2000,
      app0,     app,  ota_0,   0x10000, 0x640000,
      app1,     app,  ota_1,   0x650000,0x640000,
      spiffs,   data, spiffs,  0xc90000,0x370000,
      

      in a new file "default_16MB.csv" in the same folder as platformio.ini, and modify platformio.ini to add:

      board_build.partitions = default_16MB.csv
      build_flags = 
      	-DCORE_DEBUG_LEVEL=4
      	-DBOARD_HAS_PSRAM
      	-mfix-esp32-psram-cache-issue
      

      Which fixes the RAM issue and allows using the full size canvas.

      posted in Units
      sambartle
    • RE: M5Paper Canvas not working in Arduino IDE

      The problem including in some of the built in examples (HelloWorld.ino) seems to be related to the canvas size.. in the Hello World example it creates a 540x960 canvas (which is the resolution of the display)

      If you drop that down to 540x400.. it works fine.. Is there not enough RAM to create a canvas the size of the display maybe?

      posted in Units
      sambartle
    • RE: M5Paper Canvas not working in Arduino IDE

      Did you make any progress on this?

      The "HelloWorld.ino" example from M5EPD which I believe is very similar to the one above.. does not work either..

      #include <M5EPD.h>
      
      M5EPD_Canvas canvas(&M5.EPD);
      
      void setup()
      {
          M5.begin();
          M5.EPD.SetRotation(90);
          M5.EPD.Clear(true);
          M5.RTC.begin();
          canvas.createCanvas(540, 960);
          canvas.setTextSize(3);
          canvas.drawString("Hello World", 45, 350);
          canvas.pushCanvas(0,0,UPDATE_MODE_DU4);
      }
      
      void loop()
      {
      
      }
      

      Produces a blank page when rendered.

      posted in Units
      sambartle