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:32 pm

I'm beginner with PYBv1.1
Without SD card I works fine: I try several example in "main.py"
When I insert an empty SD card in the board, /PYBFLASH driver is no more visible.
I expected to see /PYBFLASH drive with also /SD drive.
Also the "main.py" in flash not run.
What's 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 » Thu Apr 13, 2017 4:21 pm

The way that the pyboard works is that if there is an SD card present, then then PC sees the contents of the sdcard. If there is no sdcard present then the PC sees the contents of the internal flash.

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

SD card not visible

Post by msuzzi » Fri Apr 14, 2017 9:11 am

when I insert an empty SD card ("SD present") in the pybord, nothing appear on PC: no /SC e no /PYBFLASH
Whithout SD card, pybord shows /PYBFLASH drive to PC.
How can I use SD card ?
Do I need to put something (and what) into SD card before to insert in the pyboard ?
Do SD card need to be formatted ? Which kind of fomatting ? FAT32 ?

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 » Fri Apr 14, 2017 6:09 pm

Yes - the sdcard needs to be formatted as FAT32 in order for the pyboard to see files on it.

Is the sdcard visible to the pyboard?

i.e. if you do:

Code: Select all

import os
os.listdir('/sd')
does it show a list of files on the sd card or does it show an error?

Is there a boot.py file on the sd card?

Post Reply