[Microbit-Python] Play Simple Slalom

Damien George damien.p.george at gmail.com
Mon Sep 28 18:40:57 CEST 2015


Hi Larry,

Thanks for the great feedback!  Just quickly to respond to a few points:

> Finally, it'd be deluxe to be able to upload just the text payload, rather
> than the entire firmware--that's speed things up immensely.  It looks like
> the firmware format allows specifying the offset; could we emit a
> supplemental firmware.hex that just overwrote the program text area but left
> the actual Micropython alone?

Yes, I think that would be possible.  Just make a standalone .hex with
the script.  I didn't yet try it.  The show stopper would be that if
the device erases all its flash pages before coping the .hex.  I don't
know the details of how it works to know about this point.  I guess it
just need experimenting!

BTW, you will like tools/pyboard.py: it's a script that allows to
download your own script to the microbit (from your PC) and execute
it.  Eg:

python3 ./tools/pyboard.py /dev/ttyACM0 my_microbit_program.py

Caveats:
- Since it uploads the script all at once there must be enough RAM to
hold the script *and* to compile it.  For this reason large scripts
won't work this way.
- You may need to reset the microbit (using its reset button on the
"back") between runs of pyboard.py (don't know why yet, probably due
to memory issues again).

Cheers,
Damien.


More information about the Microbit mailing list