Add SPI import to SD card upload example

As the code exists now, you won't be able to mount the SD card due to the missing import.
pull/960/head
John Bintz 2024-06-14 06:08:11 -04:00 zatwierdzone przez GitHub
rodzic 7a2ebe5c0d
commit f495fb8b70
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -31,7 +31,7 @@ Alternatively, you can transfer them using Thonny, but you will have to mount th
```python
import os
import sdcard
from machine import Pin
from machine import Pin, SPI
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")