Read from SD card
Powersoft last edited by
Is it posible to read pictures from the sd card and display them?
If posible is there an example?
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.
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