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

    Lcd driver for M5Stack Core2

    Scheduled Pinned Locked Moved Micropython
    29 Posts 4 Posters 96.4k Views 2 Watching
    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.
    • W Offline
      Wolli01 @Russ
      last edited by

      @russ
      Many, many thanks!
      It works perfectly, you saved my project.

      R 1 Reply Last reply Reply Quote 0
      • R Offline
        Russ @Wolli01
        last edited by

        @wolli01 Excellent, glad it worked for you.

        1 Reply Last reply Reply Quote 0
        • B Offline
          BricoMS @Russ
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • W Offline
            Wolli01
            last edited by Wolli01

            @russ
            How can you include the internal SD card in your firmware? Do you have any ideas about this?
            I have not found anything yet.

            1 Reply Last reply Reply Quote 0
            • W Offline
              Wolli01
              last edited by

              Found out now.
              It must be installed before the display driver in any case.

              #SD-Card
              uos.mount(machine.SDCard(slot=3, sck=18, mosi=23, miso=38, cs=4,), '/sd')
              print(uos.listdir('/sd'))

              1 Reply Last reply Reply Quote 0
              • W Offline
                Wolli01
                last edited by

                Leider kommen diese Fehlereldungen wenn ich was speichern will. Das lesen geht.
                E (39687) sdmmc_cmd: sdmmc_read_sectors_dma: sdmmc_send_cmd returned 0x107
                E (39697) sdmmc_cmd: sdmmc_write_sectors_dma: sdmmc_send_cmd returned 0x105

                1 Reply Last reply Reply Quote 0
                • W Offline
                  Wolli01
                  last edited by

                  I load the SD driver after the LCD everything goes but the screen is not displayed.
                  If I load the SD driver before the screen, the SD does not work.
                  Something interferes then.

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    Russ
                    last edited by

                    I was able to make concurrent display and sdcard work on the original M5Stacks https://github.com/russhughes/TinyBigBuckBunny but have not been able to make it work on the Core2's yet. I'm not sure why yet.

                    1 Reply Last reply Reply Quote 1
                    • R Offline
                      Russ
                      last edited by

                      I was able to get simultaneous display and sdcard access working. The M5CORE2 firmware.bin has been updated. See the tbbunny.py example from https://github.com/russhughes/ili9342c_mpy/blob/main/examples/M5CORE2/tbbunny.py

                      W 2 Replies Last reply Reply Quote 1
                      • W Offline
                        Wolli01 @Russ
                        last edited by

                        @russ
                        Thank you for your work.
                        It works now.

                        1 Reply Last reply Reply Quote 1
                        • W Offline
                          Wolli01 @Russ
                          last edited by

                          @russ
                          Hello, is there any way to use the three touch buttons as well?

                          1 Reply Last reply Reply Quote 0
                          • R Offline
                            Russ
                            last edited by

                            Yes, I’ll add an example working with the touchscreen later tonight.

                            W 1 Reply Last reply Reply Quote 0
                            • W Offline
                              Wolli01 @Russ
                              last edited by

                              @russ
                              Super!
                              Thank you for doing this work.

                              R 1 Reply Last reply Reply Quote 0
                              • R Offline
                                Russ @Wolli01
                                last edited by

                                @wolli01 Updated repo with two examples using the touchscreen. The buttons on the Core2 are actually part of the touchscreen that extend below the display from about Row 240 to 279.

                                Button press example:
                                https://github.com/russhughes/ili9342c_mpy/blob/main/examples/M5CORE2/buttons.py

                                Very simple paint program:
                                https://github.com/russhughes/ili9342c_mpy/blob/main/examples/M5CORE2/paint.py

                                W 1 Reply Last reply Reply Quote 0
                                • W Offline
                                  Wolli01 @Russ
                                  last edited by

                                  @russ
                                  Thank you very much for your effort.
                                  What is this code for in the end?
                                  Is it mandatory to use it?

                                  finally:
                                      # shutdown
                                      spi.deinit()
                                  
                                  ajb2k3A 1 Reply Last reply Reply Quote 0
                                  • ajb2k3A Offline
                                    ajb2k3 @Wolli01
                                    last edited by

                                    @wolli01 said in Lcd driver for M5Stack Core2:

                                    @russ
                                    Thank you very much for your effort.
                                    What is this code for in the end?
                                    Is it mandatory to use it?

                                    finally:
                                        # shutdown
                                        spi.deinit()
                                    

                                    The code de initialises the SPI bus so that that other functions can use the pins or the bus

                                    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!

                                    W 1 Reply Last reply Reply Quote 0
                                    • W Offline
                                      Wolli01 @ajb2k3
                                      last edited by

                                      @ajb2k3
                                      Thanks for the info.
                                      Where is the best place to put it in the code

                                      R 1 Reply Last reply Reply Quote 0
                                      • R Offline
                                        Russ @Wolli01
                                        last edited by

                                        @wolli01 At the very end of the program before it quits.

                                        W 2 Replies Last reply Reply Quote 0
                                        • W Offline
                                          Wolli01 @Russ
                                          last edited by

                                          This post is deleted!
                                          1 Reply Last reply Reply Quote 0
                                          • W Offline
                                            Wolli01 @Russ
                                            last edited by

                                            @russ
                                            I have a problem with the SD card.
                                            My program runs sometimes 1-2 days well through and then when it comes to an error and hangs, it is restarted by the watchdog. When restarting but then no longer the SD card with the command:
                                            sd_device = sdcard.SDCard(spi, cs=Pin(4), baudrate=20000000)
                                            installed.
                                            Do you have a tip what this could be and how I can change it?

                                            1 Reply Last reply Reply Quote 0

                                            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