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

    M5Paper Canvas not working in Arduino IDE

    Units
    6
    13
    17.2k
    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.
    • ZontexZ
      Zontex @Powersoft
      last edited by

      @powersoft have you tried any of the built in examples in the M5Paper library?

      1 Reply Last reply Reply Quote 0
      • sambartleS
        sambartle
        last edited by

        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.

        P 1 Reply Last reply Reply Quote 0
        • sambartleS
          sambartle
          last edited by

          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?

          1 Reply Last reply Reply Quote 0
          • sambartleS
            sambartle
            last edited by

            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.

            M 1 Reply Last reply Reply Quote 1
            • P
              Powersoft @sambartle
              last edited by

              @sambartle
              Yes, all is working fine. When I was srated i dont find the M5Paper. After installing all m5stack elements I had the posibility tp choose th M5Paper, snd all examples running well!

              ZontexZ 1 Reply Last reply Reply Quote 0
              • ZontexZ
                Zontex @Powersoft
                last edited by

                @powersoft glad you got it sorted out :)

                1 Reply Last reply Reply Quote 0
                • E
                  entrusc
                  last edited by entrusc

                  @sambartle I struggled for a few hours now to find out why the display is not showing anything ... then I found your response here. Now it works flawlessly - thanks a lot!

                  M5 folks: you might want to add that to your library's README on GitHub - I can't be the only one who wants to use platformio for developing software for the M5 Paper.

                  1 Reply Last reply Reply Quote 0
                  • M
                    mattp @sambartle
                    last edited by

                    Is there a fix for arduino IDE as well? Having the exact same issue with the canvas size on latest arduino IDE. Or did I use the wrong board configuration? (Using M5Stack-Core-ESP32 because there is no dedicated M5Paper board config)

                    ajb2k3A P 2 Replies Last reply Reply Quote 0
                    • M
                      mattp
                      last edited by

                      Is there a working solution for the Arduino IDE as well?
                      Also: is there an official board configuration available yet? I only find M5Core, M5Stick C,... but none for the M5Paper

                      1 Reply Last reply Reply Quote 0
                      • ajb2k3A
                        ajb2k3 @mattp
                        last edited by

                        @mattp reupdate arduino libs and board definations as there is a M5paper option now under boards.

                        UIFlow, so easy an adult can learn it!
                        If I don't know it, be patient!
                        I've ether not learned it or am too drunk to remember it!
                        Author of the WIP UIFlow Handbook!
                        M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                        1 Reply Last reply Reply Quote 0
                        • P
                          Powersoft @mattp
                          last edited by

                          @mattp
                          Hello, found the solution into this video frome LUKE

                          “M5Paper Seasons Greetings Display” on youtube.

                          He describe how to load the definitions of the m5stack boards.

                          This video was verry helpfull for me😮

                          M 1 Reply Last reply Reply Quote 0
                          • M
                            mattp @Powersoft
                            last edited by

                            @powersoft, @ajb2k3
                            Thank you both for your answers.
                            The board manager url found on https://docs.m5stack.com/#/en/arduino/arduino_development is apparently the old one and still does not contain the M5Paper board, but through the youtube video powersoft recommended I was able to find the correct url and everything works now as expected :)

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