Skip to content

Commit

Permalink
Inky Frame: Include SDCard from micropython-lib.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Oct 6, 2023
1 parent 670fb4e commit d873026
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
3 changes: 3 additions & 0 deletions micropython/board/PICO_W_INKY/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
require("urllib.urequest")
require("umqtt.simple")

# SD Card
require("sdcard")

# Bluetooth
require("aioble")

Expand Down
Binary file removed micropython/examples/common/lib/sdcard.mpy
Binary file not shown.
4 changes: 0 additions & 4 deletions micropython/examples/inky_frame/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ The wireless examples need `network_manager.py` and `WIFI_CONFIG.py` from the `c

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.

Finally for examples loading images, you'll need `sdcard.mpy` from `common/lib`. You should place this file in `lib` on your Pico W.

- [/micropython/examples/common](../common)

### Button Test
[button_test.py](button_test.py)

Expand Down
17 changes: 12 additions & 5 deletions micropython/examples/inky_frame/image_gallery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,18 @@ Copy the images to your Pico W using Thonny.

### image_gallery_sd.py / image_gallery_sd_random.py

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).

The SD card examples require `sdcard.mpy` from `common/lib` - copy this file into the `lib` directory on your Pico W.

- [/micropython/examples/common](../../common)
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:

```python
import os
import sdcard
from machine import Pin
sd_spi = SPI(0, sck=Pin(18, Pin.OUT), mosi=Pin(19, Pin.OUT), miso=Pin(16, Pin.OUT))
sd = sdcard.SDCard(sd_spi, Pin(22))
os.mount(sd, "/sd")
```

## Image Credits

Expand Down

0 comments on commit d873026

Please sign in to comment.