Pi pico reading image file from microSD card

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
Post Reply
darkthief
Posts: 6
Joined: Tue Jun 15, 2021 11:08 am

Pi pico reading image file from microSD card

Post by darkthief » Tue Jun 15, 2021 11:31 am

I am using an microSD card module with the pi pico. How do I read an image file(e.g .png file) from the microSD card? Are there any library that can be use?

hippy
Posts: 130
Joined: Sat Feb 20, 2021 2:46 pm
Location: UK

Re: Pi pico reading image file from microSD card

Post by hippy » Tue Jun 15, 2021 12:39 pm

I would guess something like ...

Code: Select all

with open("/sd/filename.png", "rb") as f:
  imageBytes = f.read()

Post Reply