docs/esp32: Add SDCard to quickref.

This commit is contained in:
Mike Causer 2021-04-30 14:04:37 +10:00 committed by Damien George
parent a65942a41d
commit a111889705
1 changed files with 15 additions and 0 deletions

View File

@ -424,6 +424,21 @@ Notes:
p1 = Pin(4, Pin.OUT, None) p1 = Pin(4, Pin.OUT, None)
SD card
-------
See :ref:`machine.SDCard <machine.SDCard>`. ::
import machine, uos
# Slot 2 uses pins sck=18, cs=5, miso=19, mosi=23
sd = machine.SDCard(slot=2)
uos.mount(sd, "/sd") # mount
uos.listdir('/sd') # list directory contents
uos.umount('/sd') # eject
RMT RMT
--- ---