You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey Folks,
as diskussed with @kdschlosser some sample for mounting SDCARD.
Greetings
Sebastian
frommachineimportSPI, SDCardimportvfs# Initialize the SPI bus with appropriate pinsspi_bus=SPI.Bus(
host=2, # SPI bus host number (adjust based on your board)mosi=11, # Master Out Slave In (adjust based on your hardware)miso=13, # Master In Slave Out (adjust based on your hardware)sck=12# Clock pin (adjust based on your hardware)
)
sd=NonewhilesdisNone:
try:
sd=machine.SDCard(
spi_bus=spi_bus,
cs=10,
freq=1000000
)
vfs.mount(sd, "/sd")
print('Flash Mounted')
print(os.listdir('/sd'))
exceptExceptionaser:
sd=Noneprint('sd card failure')
time.sleep(5)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey Folks,
as diskussed with @kdschlosser some sample for mounting SDCARD.
Greetings
Sebastian
Beta Was this translation helpful? Give feedback.
All reactions