Hi everybody.
According to the Pyboard D reference, the if an SD card is inserted, by default it will not be automatically mounted in the board’s filesystem but it will be exposed as a mass storage device if USB is used.
My SD Card doesn't show as a mass storage device, no matter it's mounted or not.
Why?
SD Card over USB MCS
Re: SD Card over USB MCS
It might help if you post the code you are using? Do you get any error messages?
I have this in boot.py (probably in common use)...
import sys, uos, pyb
# If an SD is detected, mount it
It works as expected when there is a card inserted.. however you may not see the sdcard appear on the device connected by USB, without using (and doing so might stop you seeing the pyboard D storage as /flash) :
pyb.usb_mode('VCP+MSC', msc=(pyb.SDCard(),))
There are combinations of of pyb.usb_mode command which could let you see multiple msc devices.
I have this in boot.py (probably in common use)...
import sys, uos, pyb
# If an SD is detected, mount it
Code: Select all
if pyb.SDCard().present():
uos.mount(pyb.SDCard(), '/sd')
sys.path[1:1] = ['/sd', 'sd/lib']
pyb.usb_mode('VCP+MSC', msc=(pyb.SDCard(),))
There are combinations of of pyb.usb_mode command which could let you see multiple msc devices.