Skip to content

Commit 0f75a28

Browse files
committed
Inky Frame: Include SDCard from micropython-lib.
1 parent e691628 commit 0f75a28

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

micropython/board/PICO_W_INKY/manifest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
require("urllib.urequest")
66
require("umqtt.simple")
77

8+
# SD Card
9+
require("sdcard")
10+
811
# Bluetooth
912
require("aioble")
1013

-2.49 KB
Binary file not shown.

micropython/examples/inky_frame/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ The wireless examples need `network_manager.py` and `WIFI_CONFIG.py` from the `c
2727

2828
You'll also need to install the `micropython-urllib.urequest` library using Thonny's 'Tools' > 'Manage Packages' or `common/lib/urllib` which contains a compiled `.mpy` version that uses less RAM. You should place this directory in `lib` on your Pico W.
2929

30-
Finally for examples loading images, you'll need `sdcard.mpy` from `common/lib`. You should place this file in `lib` on your Pico W.
31-
32-
- [/micropython/examples/common](../common)
33-
3430
### Button Test
3531
[button_test.py](button_test.py)
3632

micropython/examples/inky_frame/image_gallery/README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,18 @@ Copy the images to your Pico W using Thonny.
2424

2525
### image_gallery_sd.py / image_gallery_sd_random.py
2626

27-
Pop an SD card into your computer to copy the images across. (Alternatively, you can transfer them using Thonny, but you will have to mount the SD card using the REPL first).
28-
29-
The SD card examples require `sdcard.mpy` from `common/lib` - copy this file into the `lib` directory on your Pico W.
30-
31-
- [/micropython/examples/common](../../common)
27+
Pop an SD card into your computer to copy the images across.
28+
29+
Alternatively, you can transfer them using Thonny, but you will have to mount the SD card using the REPL first:
30+
31+
```python
32+
import os
33+
import sdcard
34+
from machine import Pin
35+
sd_spi = SPI(0, sck=Pin(18, Pin.OUT), mosi=Pin(19, Pin.OUT), miso=Pin(16, Pin.OUT))
36+
sd = sdcard.SDCard(sd_spi, Pin(22))
37+
os.mount(sd, "/sd")
38+
```
3239

3340
## Image Credits
3441

0 commit comments

Comments
 (0)