start code from uSD?

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
nsoatw
Posts: 15
Joined: Mon May 12, 2014 6:13 pm

start code from uSD?

Post by nsoatw » Tue May 13, 2014 10:13 am

I like the simplicity of starting the code I want to run by referencing it in boot.py.
Now I'm wondering if there is a way to start code that resides on the uSD-card? Something like:
pyb.main('sd/my_code.py')

nsoatw
Posts: 15
Joined: Mon May 12, 2014 6:13 pm

Re: start code from uSD?

Post by nsoatw » Thu May 15, 2014 10:39 am

Replying to myself:
accellog.py located in the source-code example folder suggests that 1:/ is used for SD and 0:/ is used for internal flash.
Will try when I get home tonight.

SkG
Posts: 18
Joined: Mon Mar 10, 2014 2:57 pm

Re: start code from uSD?

Post by SkG » Fri May 16, 2014 8:39 am

If you have a SD card in the slot the board will start from it like it was the internal memory. That is it will run boot.py from the SD card when it start or get reseted.

Post Reply