sd card not visible

The official pyboard running MicroPython.
This is the reference design and main target board for MicroPython.
You can buy one at the store.
Target audience: Users with a pyboard.
Post Reply
msuzzi
Posts: 4
Joined: Thu Apr 13, 2017 3:22 pm

sd card not visible

Post by msuzzi » Thu Apr 13, 2017 3:43 pm

I'm a beginenr with PYBv1.1 board
I try several examples in FLASH and work fine.

When I insert an empty SD card, I expected to see /SD drive together /PYBFLASH
but instead no /SD , no /PYBFLASH and "main.py" in flash NOT run.

What' wrong ?

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: sd card not visible

Post by dhylands » Sun Apr 16, 2017 7:14 pm

That's normal behaviour. The current firmware only supports making a single volume visible to the PC.

When an sdcard is plugged in, then only the sdcard is visible to the PC. When no sdcard is plugged in, then the internal filesystem is visible to the PC.

By default, if an sdcard is plugged in, the main.py from the sdcard is run. You can create an empty file with the filename of SKIPSD on the internal filesystem and it will only run main.py from the internal filesystem and won't look at the sdcard.

If the /flash/SKIPSD file is present, then the sdcard will be totally ignored (as if the sdcard was not present).

msuzzi
Posts: 4
Joined: Thu Apr 13, 2017 3:22 pm

sd card not visible

Post by msuzzi » Tue Apr 18, 2017 8:00 am

With an external SD reader, I wrote in the SD card 3 files
boot.py, cardread.py, datalogger.py
taken from
https://github.com/micropython/micropyt ... datalogger

Now something happens (pyboard leds light on and off) but /SD drive still does not see
(nor /PYBFLASH as you wrote, but I thought to see /SD)

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: sd card not visible

Post by pythoncoder » Tue Apr 18, 2017 4:57 pm

@msuzzi The flash drive is in /flash not /PYBFLASH - as far as I can you alone wrote that.

With the SD card fitted to the Pyboard SD socket, what happens when you issue the following

Code: Select all

import os
os.listdir('/sd')
os.listdir('/flash')
In each case you should get a Python list showing the files on the device.
Peter Hinch
Index to my micropython libraries.

Post Reply