MicroPython on the BBC micro:bit

Announcements and news related to MicroPython.
pfalcon
Posts: 1155
Joined: Fri Feb 28, 2014 2:05 pm

Re: RE: Re: MicroPython on the BBC micro:bit

Post by pfalcon » Wed Oct 21, 2015 11:34 am

Damien wrote: In the beginning it was. But then I needed to use the fancy new yotta build system, and this does everything automagically and forces a directory structure upon you.
Up to the level of not allowing to use existing directory structure with symlinks, etc.? That's crazy.

I thought the biggest problem might be that it doesn't allow to plug source file autogeneration. And that brings another question I wanted to ask - we had reports of that before with people using various vendor compilers, lately I see similar issue porting for Android NDK build system, and here's yotta case. So, even if there's gcc underlyingly, vendor build systems apply their own restrictions, and we apparently shouldn't ignore it any longer and do something to account for that.

I'm not sure what exactly and to what extent. First step can be just adding "make gen" to autogenerate all files in one go, leaving with just C code which can be copied somewhere else for building.
Awesome MicroPython list
Pycopy - A better MicroPython https://github.com/pfalcon/micropython
MicroPython standard library for all ports and forks - https://github.com/pfalcon/micropython-lib
More up to date docs - http://pycopy.readthedocs.io/

lucien2k
Posts: 24
Joined: Sun Oct 11, 2015 5:34 pm

Re: MicroPython on the BBC micro:bit

Post by lucien2k » Fri Oct 30, 2015 8:07 pm

Very cool, so will it ship with MicroPython by default or will kids get a choice of language/system?

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: RE: Re: MicroPython on the BBC micro:bit

Post by Damien » Fri Oct 30, 2015 11:24 pm

pfalcon wrote: Up to the level of not allowing to use existing directory structure with symlinks, etc.? That's crazy.
It probably could have allowed symlinks. But yotta likes to have the config and output-build files in the root directory, so it wouldn't really work to make a microbit/ subdir. Furthermore, yotta likes to make your code into a package that's automatically entered into their package directory, and if you don't do things the correct way it doesn't work. Oh yeah, and I didn't want thousands of lines of unneeded code (stmhal/hal/*) confusing the microbit repo, which is supposed to be inspected by inquisitive kids.
I thought the biggest problem might be that it doesn't allow to plug source file autogeneration.
It kind of does, since it just uses cmake underneath (it's really just a wrapper that creates cmakefiles). But to generate the qstrs I just provided a simple Makefile and makeqstrdata.py.
And that brings another question I wanted to ask - we had reports of that before with people using various vendor compilers, lately I see similar issue porting for Android NDK build system, and here's yotta case. So, even if there's gcc underlyingly, vendor build systems apply their own restrictions, and we apparently shouldn't ignore it any longer and do something to account for that.

I'm not sure what exactly and to what extent. First step can be just adding "make gen" to autogenerate all files in one go, leaving with just C code which can be copied somewhere else for building.
An amalgamation? :)

If you do any development of Python modules then you need to generate the qstrs, so you need to pull in makeqstrdata.py and find some way to run it. For mpversion.h, I just generated it using "make -C unix" and then copied mpversion.h.

At the moment it's really not that bad, but I agree the header-file generation process could be further simplified.

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: MicroPython on the BBC micro:bit

Post by Damien » Fri Oct 30, 2015 11:27 pm

lucien2k wrote:Very cool, so will it ship with MicroPython by default or will kids get a choice of language/system?
There'll be a choice of a few languages, including Microsoft's Touch Develop. There might be a chance to have MicroPython shipped on it by default :D

BTW, the microbit mailing list has just been opened up to the public: microbit@python.org, see https://mail.python.org/mailman/listinfo/microbit

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: MicroPython on the BBC micro:bit

Post by Damien » Sat Jan 16, 2016 10:38 pm

Microsoft have been taking inspiration from MicroPython and they have now implemented an in-browser compiler for their Touch Develop system. Read about it here(MicroPython is mentioned under "The inspiration" section): https://www.touchdevelop.com/docs/touch ... n-208-bits

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: MicroPython on the BBC micro:bit

Post by Damien » Thu Mar 10, 2016 10:16 am

The online editor for MicroPython on the micro:bit is now live and can be found at: https://www.microbit.co.uk/create-code (click on "New Project" within the big Python box).

There is also a dedicated offline editor: https://github.com/ntoll/mu

And python.org has a dedicated page for the micro:bit: https://www.python.org/community/microbit/

Turbinenreiter
Posts: 288
Joined: Sun May 04, 2014 8:54 am

Re: MicroPython on the BBC micro:bit

Post by Turbinenreiter » Thu Mar 10, 2016 1:02 pm

Is there a way to buy a micro:bit?

Damien
Site Admin
Posts: 647
Joined: Mon Dec 09, 2013 5:02 pm

Re: MicroPython on the BBC micro:bit

Post by Damien » Thu Mar 10, 2016 9:28 pm

Turbinenreiter wrote:Is there a way to buy a micro:bit?
Not yet. Keep an eye on Kitronik: https://www.kitronik.co.uk/ they already sell microbit accessories.

SpotlightKid
Posts: 463
Joined: Wed Apr 08, 2015 5:19 am

Re: MicroPython on the BBC micro:bit

Post by SpotlightKid » Thu Mar 10, 2016 9:59 pm

It's a very limited device anyway. Unless you want to use it for teaching, all other boards supported by MicroPython are far more capable.

Turbinenreiter
Posts: 288
Joined: Sun May 04, 2014 8:54 am

Re: MicroPython on the BBC micro:bit

Post by Turbinenreiter » Thu Mar 10, 2016 10:30 pm

Using it for teaching is the plan.

Post Reply