docs: Use vfs module instead of os.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -650,15 +650,15 @@ SD card
|
||||
|
||||
See :ref:`machine.SDCard <machine.SDCard>`. ::
|
||||
|
||||
import machine, os
|
||||
import machine, os, vfs
|
||||
|
||||
# Slot 2 uses pins sck=18, cs=5, miso=19, mosi=23
|
||||
sd = machine.SDCard(slot=2)
|
||||
os.mount(sd, '/sd') # mount
|
||||
vfs.mount(sd, '/sd') # mount
|
||||
|
||||
os.listdir('/sd') # list directory contents
|
||||
|
||||
os.umount('/sd') # eject
|
||||
vfs.umount('/sd') # eject
|
||||
|
||||
RMT
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user