BBC’s micro:bit Gets Python

The BBC has developed a computer to be used by thousands of students across the UK. While not very powerful in terms of hardware, it comes with an interpreted language that will get students writing their own code and will launch the careers of an entire generation of web developers. This is, of course, the BBC Micro, a computer introduced in 1981, but is still deeply revered by millions of former students.

Microcontrollers are everywhere now, and the BBC is looking to replicate their success with the micro:bit. Unlike the BBC Micro, this isn’t a proper computer with a keyboard and a monitor. Instead, it’s a microcontroller development platform based on an ARM chip. Now, the micro:bit is getting Python, the BASIC of today, and will assuredly be even more useful in UK classrooms.

The initial development for Python on the micro:bit started down the road of using Microsoft’s TouchDevelop as a browser-based IDE that would send C++ code to an mBed cloud compilation service. A hex file would be generated, this would be downloaded to the local file system, and finally the student would simply drag the hex file over to the micro:bit since it appeared on the desktop as a USB storage device. This was a terrible idea, because MicroPython exists. The current way of running Python on the micro:bit is as simple as plugging it in to a USB port, opening a terminal, and writing some code. It’s the closest you’re ever going to get to a computer with BASIC in ROM, and it’s the best device for millions of 11-year-olds to learn how to code.

Thanks [dassheep] for the tip.

40 thoughts on “BBC’s micro:bit Gets Python

      1. You’re right – it’s a computer you need another computer to program… Awesome.

        This will be great for some, for others it will be something to use while plodding through mind-numbing step-by-step instructions to ‘create’ something trivial.

        Wouldn’t it be just as good to have the kids program apps for an android device? You can get them quite affordably ($20-30) and they are much more engaging than a device with two buttons and an 8×8 led array…

        1. Needing a terminal (or external programmer) is ok in the MCU universe.

          In the days of cheap WiFi-UARTs or Bluetooth modules and every 10yr old having a fatter phone than me they’ll soon will find out how to connect from their phone to the MICRO:BIT.

          Having builtin keyboard+video features is not a common feature of MCUs.
          That’s the way life is in MCU land…

          And I really think it is ok that way.

    1. I don’t think, the RasPI ever will be a good learning platform or media box or mini server.

      The PI wants to be an “Ovogena lano-lakto-porko” with too many features and does not statisfy the target audiences it claims to address.

      The GPIOs are too easy to burn to be beginner proof.
      The overfeaturedness confuses the pupils.

      Low cost learning platform and HDMI doesn’t match well, so no GPU at all and being cheaper would have been a better alternative for the classroom.

      The sound doesn’t really please “HiFi ears” when used as media centre or music box.

      External storage only via SD card (wearing out on writes) or USB media (bottleneck) does not really make an attractive mini server..

      So which target audience did the developers have in mind?
      That’s really beyond my imagination.

      But we only focus pupils now.

      A simpler (less features) and cheaper platform with “today’s BASIC” (Python) or maybe even classic BASIC will have less distrations on the pupils and because there is no Doom, no EMACS, no Powerpoint… for the MICRO:BIT, they will be more proud about their self written code because it does not compete with all those killer apps in the PI. Please don’t underestimate this influence on the pupil while learning.

      I really think less (features and cost) is more in this context.

      1. Well, it’s sold 5 million units, which suggests that a lot of people find it meets their needs.

        What’s your solution? If you don’t have a GPU of some kind you don’t have video out, so it can’t be used standalone without another computer. The mini server market has quite a lot of ready-made products in it; Apple/Google/Amazon etc all have simple HDMI media centre devices. Music market was conquered by the iPod long ago.

  1. Ok? Why? You aren’t going to do advanced statistical computation on this board, why does it need python? What advantage is there? I’m not only asking because I hate Tuples, but because I am curious.

        1. Especially the links that clearly lead to the official website of the project being discussed. How dare you spoil my argument with facts! ;)

          But seriously, Python is a huge advantage on a learning platform for several reasons:

          * Teachers already know and like Python, so that means easier adoption.
          * You can try your commands interactively in the console, which hugely speeds up learning my trial and error.
          * It’s a modern, readable, convenient language with focus on ease of use. We used to say that the target audience of Python are the people who don’t know it.
          * You don’t have to spend frustrating time trying to convince the compiler to compile your code without errors — you just run your code on the board and see what it does. Sure, most of the time it does the wrong thing, but you can see that and adjust, instead of sitting there dumbfounded staring at the screen.
          * If you learn Python with the micro:bit, you may later do advanced statistical analysis on a huge data center as your day job.

          1. Indeed. I think you can pretty much simplify your list to this:

            * You can try your commands interactively in the console, which hugely speeds up learning my trial and error.

            Kids in the intended age-group learn by trial and error only. It will be a few more years before they will be able to abstractly model something in their head (or on paper) and execute it.

            The goal of micro:bit is not to turn these kids into great programmers. The goal is not even to interest them in programming computers. The goal is to teach them how they can use a computer to help them with the things that they ARE interested in.

            After all, a computer is a tool and not a goal. The computer itself is only a goal for software developers. But only 1 guy in 1000 is (or will want to be) a software developer. All the other 999 people simply want to use the computer as a tool to reach their goal. And the more the tool is as versatile as a hammer, the better. :)

  2. I have an 11yr old who will hopefully be recieving one of these (if the school doesn’t try to keep them instead of giving them away to the kids as is what is meant to happen), So I’ll do a writeup on the board as soon as I can and submit it to HAD.

    1. I always had a baaad feeling about pupils getting IT courses at school and then only sitting in front of MS products. Such courses should get a disclaimer like TV shows sponsored by product placements!

    2. Um, actually… I really hate to spoil that for you… Microsoft is one of the main sponsors of the program, and it provides the online programming software (the editor and compilers) and the cloud infrastructure it runs on…

          1. You sure?

            “Micro Python was successfully funded via a Kickstarter campaign. The software is available to the public under the MIT open source license.” ~https://www.micropython.org

    1. It’s interesting, but I think that Python is a little more versatile than Basic. I think that the choice for using Basic for this Micromite was influenced a little to much by sentimental feelings of the author. No flame intended towards the author. But in these times, Python runs on many more platforms than Microsoft Basic. It’s Microsoft’s own fault of course, caused by their limited understanding of ‘platform-independent’. :)

  3. From the link:
    “Microsoft’s TouchDevelop is a fascinating open source project: it’s a browser based visual IDE for kids that generates a JSON based AST that’s turned into C++ and sent to ARM’s mBed cloud compilation service. Ultimately, a hex file is delivered to the user’s browser and downloaded onto their local file-system. Plugging in the micro:bit makes it appear as USB storage and you flash it by dragging the hex file onto the device.”

    God I can’t wait for this cloud nonsense to blow over. What an insane world tour just to generate a .bin file.

  4. This is the BBCs response to the CodeBug, an indie startup that one of my friends is a developer for. I’m not too specific on details because I only get the news via social media and bar chat but the story is a little like this: They approached the BBC looking for support but declined the deal they offered, which would have screwed them over. Shortly after, the bbc got a team on creating this, which is very similar in both form and function to CodeBug. So they’re getting screwed over anyway. There was little the team could do against an organisation as big and well funded as the BBC. But as a teacher or parent reading this article and thinking one would be great for your child, or even a hacker wanting a little bit of tech to fiddle with, consider CodeBug and support the real creators.

    Their website is at codebug dot org dot uk, they ran a kickstarter campaign too.

    1. They should have patented it! Oh, wait, you can’t patent general ideas about improving technical education of kids? That’s an outrage.
      To me it doesn’t really matter who gets to wave the banner, as long as they create the community and make it work for the benefit of everyone.
      Plus, this is not Highlander, there can be more than one. If micro:bit is a success, other countries will seek a similar solution, and that may actually be very good for the CodeBug.

    2. I think that indie startup relied a little too much on having just one customer. The BBS is proving there’s a market for this. That indie company should be happy. Because there are 7 billion people on this earth, and 1 million kids is nothing.

      If the BBC proves that it’s a good idea, then other countries will want to follow. If your indie company then has a turnkey solution ready for these countries, they will make millions.

      Seriously. I’m a software developer. I don’t have much business sense. But I do smell a good business here. The only reason for your indie company to not make it, is if they give up before even really starting to try. Nothing is ever begat easy: that’s a myth.

  5. My understanding is that TouchDevelop will still use the overly complicated cloud compilation service – but you will at least have the option of using MicroPython if you want. ARM was smart enough to stick a full bootloader in there, so you can run whatever you like on the board :)

    … in fact, there’s a JavaScript (Espruino) implementation for the micro:bit as well, so at least kids will have some choice about the language they use. It’ll even allow programming/debugging over BLE :)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.