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

    Read from SD card

    Arduino
    3
    3
    5.4k
    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.
    • P
      Powersoft
      last edited by

      Hello,

      Is it posible to read pictures from the sd card and display them?
      If posible is there an example?

      Cheers

      Jan

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

        Yes it is possible but it’s slower then reading from memory. I haven’t had the time yet to look into it as I have only just scratched the surface of image work.

        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
        • lukasmaximusL
          lukasmaximus
          last edited by

          Hi @Powersoft this is as simple as loading images from the flash. Only you just have to mount the sd and then point the directory towards the location of your file.

          import uos
          
          uos.sdconfig(uos.SDMODE_SPI,clk=18,mosi=23,miso=19,cs =4)
          
          uos.mountsd()
          image0 = M5Img(0, 0, "/sd/face.jpg", True)
          
          
          image0.show()
          

          Keep in mind these requirement:

          • Image must be of jpg file type
          • must not exceed 25kb in file size
          • image name including extension must not exceed 10 letters
          1 Reply Last reply Reply Quote 0
          • First post
            Last post