We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

A Million Children (and MicroPython)

00:00

Formal Metadata

Title
A Million Children (and MicroPython)
Title of Series
Part Number
2
Number of Parts
169
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Nicholas Tollervey - A Million Children (and MicroPython) The BBC micro:bit is a small programmable device for children. A million of them have been handed out to the UK's 11 and 12 years olds. The Python Software Foundation was a partner in this moon-shot scheme and, thanks to the efforts of Damien George, MicroPython runs on the device. My talk will tell the story of the project, describe Python's role in it and explain how the wider Python community can become involved. It may involve demonstrations, live coding and audience participation.
11
52
79
Red HatDemonXML
Goodness of fitLecture/Conference
Form (programming)CodeVideo gameDressing (medical)
Electronic mailing listLattice (order)Ewe languageComputerMultiplication signTranslation (relic)Self-organizationProjective planeQuicksortDisk read-and-write headNeuroinformatikVarianceCarry (arithmetic)MikrocomputerSummierbarkeitVideo gameFreewareLecture/ConferenceJSONXMLUML
ComputerEmulatorScripting languageJava appletLetterpress printingDedekind cutGrand Unified TheoryFamilySimulationNeuroinformatikQuicksortMoment (mathematics)Online helpPower (physics)SpacetimeProjective planeComputer programmingNatural numberType theoryLine (geometry)Lecture/ConferenceComputer animation
MUDImage warpingCodeLevel (video gaming)Right angleLibrary (computing)Revision controlMultiplication signLine (geometry)Computer animation
Euler anglesWhiteboardQuicksortSoftware testingUniverse (mathematics)Computer programmingNeuroinformatikProjective plane7 (number)Type theoryForm (programming)ArmComputerMoment (mathematics)Multiplication signCodeEndliche ModelltheorieLecture/Conference
Link (knot theory)HypermediaRun time (program lifecycle phase)Formal languageInternet service providerTouch typingMultiplication signBit
Touch typingComputer hardwareProjective planeQuicksortBitPhysicistWebsiteLecture/Conference
BitSoftware bugArc (geometry)Scripting languageNewton's law of universal gravitationMulti-agent systemMetropolitan area networkWide area networkSummierbarkeitMiniDiscSoftware frameworkGame theoryComponent-based software engineeringForm (programming)Term (mathematics)Software developerCodierung <Programmierung>MereologyModule (mathematics)Video gameProper mapArithmetic meanScripting languageCodeText editorWeb applicationImplementationCore dumpSoftware testingQuicksortGame theoryDifferent (Kate Ryan album)Particle systemSimilarity (geometry)Computer hardwareWebsiteProjective planeMarkup languageFormal languageRight angleReal numberWrapper (data mining)SoftwareDeterminantNatural numberOperator (mathematics)Lattice (order)Student's t-testComputer programmingTouch typingMultiplication signPlanningFlash memoryComputer fileType theoryHexagonMachine visionWordBoilerplate (text)Artificial lifeMicrocontrollerPersonal identification numberLibrary (computing)Ocean currentComplete metric spaceDemo (music)WhiteboardJSONXML
Archaeological field surveyProjective planeSampling (statistics)Pole (complex analysis)VideoconferencingTable (information)RoboticsLecture/ConferenceComputer animation
Hydraulic motorOnline helpPiHome pageMereologySingle-precision floating-point formatMultiplication signWebsiteDemo (music)Process (computing)Connected spacePersonal identification numberLecture/Conference
Computer hardwareFood energy
Electronic visual displayoutputMereologyScripting languageProcess (computing)Wage labourMatrix (mathematics)Reading (process)TelecommunicationCompass (drafting)Functional (mathematics)Greatest elementComputer hardwareCoprocessorComputer animation
Computer-generated imageryElectronic visual displayMaxima and minimaLevel (video gaming)Frame problemRange (statistics)Electronic mailing listMedical imagingCodeElectronic visual displayMeeting/InterviewComputer animation
Metropolitan area networkElectronic visual displayRandom numberComputer-generated imageryLevel (video gaming)Maxima and minimaElectronic mailing listPixelLine (geometry)Medical imagingMögliche-Welten-SemantikMatrix (mathematics)BitShape (magazine)RandomizationSource codeXMLComputer animation
CodeBitAnalytic continuationComputer programmingLecture/Conference
Metropolitan area networkRandom numberElectronic visual displayComputer-generated imagerySystem callData typeLine (geometry)Computer fileModule (mathematics)Interior (topology)Chi-squared distributionOrdinary differential equationTunisBitMusical ensembleMereologyElectronic visual displayRow (database)Mathematical analysisCASE <Informatik>Complete metric spaceSource codeXMLComputer animationLecture/Conference
System callInterior (topology)Keyboard shortcutData typeOrdinary differential equationModule (mathematics)BitSic2 (number)Type theoryBitStandard deviationComputer animation
Electronic visual displayProjective planeComputer-assisted translationCore dumpLecture/Conference
Ordinary differential equationSystem callSicInheritance (object-oriented programming)Speech synthesisComputer fileLine (geometry)Module (mathematics)Speech synthesisComputer animation
Maxima and minimaExecution unitSystem callInterior (topology)InformationData typeSpeech synthesisMetropolitan area networkMathematical singularityMusical ensembleBitLecture/ConferenceComputer animation
MereologyWireless LANVolume (thermodynamics)Moment (mathematics)Data miningLecture/Conference
EmulationElectronic visual displayLevel (video gaming)RadiusRoundingMetropolitan area networkMathematical singularityOrdinary differential equationScripting languageTemplate (C++)GodComputer animation
Online helpLaptopQuicksortFacebookWebsiteGame theoryLecture/Conference
Open setProjective planeComputer hardwareSoftwareJSONXMLUML
AreaInformationMultiplication signBitSpeech synthesisGoodness of fitJSONXMLUMLLecture/Conference
Computer animationLecture/Conference
Transcript: English(auto-generated)
Okay, everyone, I'm really happy to introduce Nicholas Tolowy, and he's going to tell you about an amazing story about 1 million kids and a microbit. So, please give a big hand for Nicholas. Thank you.
Well, good afternoon, EuroPython. So, my name is Nicholas, and it's a great pleasure to be talking to you this afternoon. For those of you who don't know me, I'm a classically trained musician.
This is what I used to do. I'm a tuba player. I'm also a philosophy graduate, and I also write books for O'Reilly, mainly. And in a previous life, I used to be a schoolteacher. And this is me on my first day as a fully qualified teacher with my new form. And these were a bunch of 11-year-old children in what in the UK we call Year 7.
So Year 7 is when you turn from 11 to 12 years old. Can you spot the only person who is ignoring the dress code of wearing a tie at the school? I never wore a tie at that school. And at the very end, they didn't buy me a tie when I left either, so.
So, I'm not the only person who's spoken at EuroPython about education. I'm sure you remember, this is my friend Carrie-Anne, who gave a barnstorming keynote last year about Python in education. I'm not quite sure what it is that she's wearing, but she appears to be very pleased about it.
So, I believe it's a helmet with Raspberry Pis on it. Maybe it's sort of some brainwave device. I'm not quite sure. Anyway, I hope you can remember what it is that Carrie-Anne said at the very end of her talk. And then thirdly, I think everyone should read this book. It's called Python in Education by Nicholas Tolive, who is here.
It's a really small book. I believe it's free. It's an O'Reilly book anyway, so you all got a voucher, so you should just go and get this even if it's not free. And you should read it, because it really does help explain about Python in education. And so, this is all due for next year, so make sure you write this in your diaries and your planners. I will be checking.
So, she set some homework, and I hope you've done it, because I'm here to collect it for her and take it back to the UK so she can give it a mark. Actually, no, I'm not. Actually, I'm here to tell you a story about how since about this time last year, the UK's Python community has stepped up and worked with the BBC and other organizations to deliver an educational project.
But before I explain what that project is, I want to give you some history. So, this is my first computer. It's a BBC microcomputer, and in the 1980s, every school in the UK got one of these.
And my father was a head teacher, and so I was, I don't know, seven or eight years old, about as old as my son who sat over there. And my dad brought it home wanting to learn how to use this so he could use it in school, and it took my brother and I about half an hour to figure out what the computer was going to do.
So, this is a simulation of a BBC micro, and I'm going to have to program this looking over my shoulder. I hope you forgive the typos and things. So, I remember my first computer program. It was this. This is BBC basic. What goes on line 30?
Go to 20. Yes. Okay. I've insulted you all. There we go.
So, David Allen, who was the project producer, explained that the aim was to democratize computing, and we didn't want people to be controlled by technology, but to control it. And for the sort of eight-year-old me, this was a moment, a revelation. I could tell people that they are an idiot automatically with a computer. This was awesome.
And I suspect that you guys have all had a very similar experience where one day you were typing something into a computer and you made it do something, and you thought, yes, this is great. I can make a computer do a wonderful thing. There's this sense of not just power, but
the fact that you can explore what this thing can do, what remarkable things it can do. So, fast forward to today, and the BBC want to get back into the education space and help in the UK, and they created something called the Microbit Project. And this is the trailer that they've been showing on BBC TV over the summer.
In the future… Hover shoes. Click button. Hologram of your nan comes up. Shows are like a map in front of you. Inside the fabric is Wi-Fi. Wi-Fi. Yes. Yes. Oh, yeah. Oh, that gives me an idea. You know where shoes… Trampoline shoes that would hover. That is rubbish.
So, you read that right. At this moment in time, one million of these small computing devices have been handed out to this year's year sevens in the UK, the 11-year-olds, like the kids in my form.
And the aim is to rekindle that sense of wonder in computing and to sort of foster a can-do attitude with computing rather than becoming consumers of technology and not asking what this technology can do. And so we sort of cherish creativity and exploration over rote learning and tests and things. So, how was this delivered?
Well, I can stand up now because I don't need to type. The BBC got together with a bunch of partners, some of whom are listed here. They range from big multinationals like ARM and Microsoft down to community sort of projects like the Code Club and universities like Lancaster University who did an awful lot of work for this.
And also the Python Software Foundation. I'm a PSF fellow, and when I heard about this project, I asked the board whether it would be appropriate for me to contact the BBC and say the BBC would like to be a partner. And they said yes, and we were kind of accepted on the program because the BBC said that they would like to use Python with this device.
Python is but one of four languages that this device supports, but obviously I'm going to talk to you about Python, this being EuroPython. So when this device was announced, and here's the press release here, the PSF were just going to be education partners. We were only going to provide educational resources, and somebody else was going to provide the Python runtime as it were.
And then, I don't know, about this time last year, the BBC got in touch with me and said the person who's going to do Python has dropped out, and we need Python on the micro-bit. Can you help out? So, I was in a bit of a pickle there, but I met somebody called Johnny from Arm, that's how he introduced himself.
Hello, I'm Johnny from Arm, that's a strange surname. Anyway, he lived next door to a chap called Damian George. Johnny is the person who designed the hardware for the micro-bit, and Damian, as I'm sure some of you know, created MicroPython. And I'd met Damian at Python UK, so I got in touch with Damian.
And Damian got hold of one of these devices, and we got MicroPython to run on the micro-bit, which is remarkable. Let me tell you a little bit about MicroPython. So, Damian is actually a physicist, and he created MicroPython as a sort of a side project. And it's a rather remarkable side project if you think about it.
Hmm, what should I do? I know, I'll re-implement Python 3 but for micro-controllers. So, we have a complete re-implementation of Python 3 running on micro-controllers. It's a remarkable achievement, and Damian is an outstandingly talented developer. He ran an extraordinarily successful Kickstarter, where he raised enough money to
actually get MicroPython out into the world on something called a Pi board. Like I said, it's a full re-implementation of Python 3. It runs on lots of different sorts of micro-controller based hardware. There's a flourishing community, and it's a sort of a testament really to Damian's talent and determination that MicroPython is the success that it is.
And we have it running on one of these devices. The other thing the BBC wanted us to do was to provide a code editor for children to use. So this is an online code editor that I wrote. It's a JavaScript based affair. And kids go to the website, the BBC website, they choose one of the four languages, they type in whatever they coded, and they click the download button.
They get a hex file that they copy onto the device, and then the program runs. But we discovered when we were testing this with teachers and students in the autumn, that actually what we needed to do was build a whole ecosystem around this remarkable device. So Damian and I met in London just before we went to a meeting for a meeting to the BBC over a cup of coffee.
And we drew up what we saw our vision of this ecosystem to be. Bear in mind that we're all volunteering our time here as well. So this is all about motivating a community to get involved too. So you've kind of got TouchDevelop, which is Microsoft's offering, into which we slotted that web-based Python editor.
But people were telling us that actually they prefer writing code in a proper editor, as it were. An editor that they could use on their desktop rather than having to go online. And also they wanted to choose which editor they wanted to use. And they wanted to go to a site where they could find out more about specifically Python.
So we needed a cross-platform native editor. We needed tools for the command line, so you could flash the device without having to use the specialist editor. We needed projects to inspire others as well. And we needed a website to sort of spread the Python education word. So we got to work. This is Mu.
You'll maybe get the joke. It's a very small, simple Python editor for children. Currently it's aimed just at the micro-bit, but we have plans to make it available for other types of Python development. So what you will see is when I'm doing the live code demo in a minute, I'll be using Mu to make that happen.
Whoa. So I also want to mention that while Mu is, the whole philosophy of Mu is that you have sort of a zero effort to get you to where you need to be. It's the simplest possible editor. Kids get coding straight away and there's no impediment to them.
This is part of a wider movement that's going on in the UK. Started by Dan Pope, which you can hear a talk about this later on. Dan created a project called Pygame Zero. So this is an API that sits on top of Pygame for children. So again, it's a zero effort.
You should be able to write a game with little or no upfront boilerplate. We have GPIO Zero by Ben Nuttall from the Raspberry Pi Foundation. A similar sort of project for the GPIO pins on a Raspberry Pi. We have Network Zero as well, which is my friend called Tim, which is based upon ZeroMQ.
Again, it's a very thin wrapper on the top, but it's child friendly. So we're asking ourselves what other things could be zero as well. Maybe you can put your thinking hats on and come up with something else zero that's a child friendly library for kids to use. So the summary is it's a child, simple child friendly API on top of real modules.
Remember, I mentioned tooling. So this is MicroFlash, which is a command line tool and a module that you can use to interact with the device. It will detect where your device is, and you can use it to flash your script. So you can write your script in whatever editor you want. You use it to flash your script onto the device so you have the freedom to choose whatever tools that you want.
You just use MicroFlash to do it yourself. Now, most of the work on MicroPython on the MicroBit was done on one single device, which Damien had. And the BBC gave the PSF-5 more, and we wanted to know how are we going to engage with the community so that they produce resources that are inspiring to children, that will get people interested in this.
And so we did a world tour, and the MicroBit went all over the place. The South Pole, it got sent with the British Antarctic Survey down to the South Pole, to Australia, to the US, all around Europe. And we got rather a lot of really cool projects out of it.
Now, Radomir, from Poland, created a robot, which I was going to show you a video of. But this morning, actually, Radomir turned up and he said, have you seen this? And this is his little MicroBit robot, but he's improved. And I'm going to put it on the table here, and I'm going to flick a switch at the back, and we'll just have to see what happens.
Okay, so. Well done, Radomir, wherever he is. The important thing is that it's the MicroBit that's controlling this, that's controlling the motors here.
The GPIO pins here, if you look very carefully, there are bolts here that are making the connections with the motors. And with the help and support of the Python Software Foundation, we are in the process of creating a pythoneneducation.org website.
This is the initial design for the homepage, and I hope that some of you consider helping out with it, because we want to put all the resources that we create for not just the MicroBit, but for Raspberry Pi, and all the other amazing pythoned education things that are happening around the world in a single place,
so people can be inspired and reuse these resources. So, this is demo time. I'm nervous, I feel, now. So, the problem with having a MicroBit is that I can't really hold it up and you're going, yep, we can see it at the back.
So, I'm going to hold it up like this and give you a quick tour of the hardware. So, on the front are 5x5 LED matrix, so these flash. You can have 0 to 9 in brightness.
A couple of buttons for input. Across the bottom are GPIO pins, some of which are big enough that you can attach crocodile clips. On the back, you can see that this is where a battery goes, that's a reset button, micro USB port. Here is a radio, so you can communicate wirelessly with devices.
If you're reading carefully, you'll see that the processor is here, and there's a compass and accelerometer here as well, so it knows what way it's facing and which way north is as well. So, that's an overview of the hardware. This is me, sorry, that is me, and I'm going to have to code over my shoulder.
So, here's one I prepared earlier. This is the simplest possible script, hello world, and I flash the device, and at the back you can see I've got an LED flashing to say, okay, there's communication happening.
Choose hello world. Hey, it works. Just fancy that. Okay, but we don't have to just scroll text, we can do animation as well.
So, display.show, we've got some built-in images, all clocks is a list of all the kind of ranges of a clock hand, and it's going to be 100 milliseconds between each frame of the animation, and I wanted to just keep looping.
You can see this is very, very simple code that we hope kids are going to understand intuitively. So, I have a little radar there we've got going, okay? So, it's going to just keep doing that until I tell it to stop.
A bit more advanced example, some more of the built-in images we've got going on here, but in not very many lines of Python, I'm choosing X and Y on the LED matrix. I'm setting a random brightness, I'm going to set that pixel. If button A was pressed, this is starting to sound like pseudo code, we've taken a lot of effort to make sure that the API that the kids use to interact with the micro bit is very, very simple.
Just to show a random image from this list here, if button B was pressed, scroll hello world, accelerometer was gesture, shake, okay? Show an angry face, let's see what happens when I do this.
A. Oh, we get a smiley face. A face with his tongue out. A rabbit. Oh, a Pac-Man ghost, and so on and so on.
Skull and if I do B, we've got our hello world program, so you can see there's a bit of continuity in the code that we've developed here. Okay, flashing, shake it. Do it again, you want to see an angry micro bit, just shake it.
Okay. But wait, there's more, you're quite right. So, this is the REPL. This is Python running on the micro bit.
So, display is clear. And what I can do is, I used to be a musician, okay? And so, what I love doing is making music a part of what I do. And so, by plugging in a speaker, I should be able to make it play music.
Again, over my shoulder. So, import music, nice and obvious. Music.play, music. We have tab completion, by the way. What's in the music module? Okay, somebody pick a tune.
I can't hear all of you. No, no. Wah wah wah. Wah wah wah wah. Should be sad trombone. Okay. I can also do this.
Okay, whoops, 40. So, if you're a musician like me, 440 is the international standard for a concert A. So, I'm going to play it for one second at that pitch. The oboe players tuning an orchestra. But I can start to do interesting things like this. So, from micro bit import star.
Yes, I know, I know, I know. Well, whoops, while true. I'm trying to type here without looking at this thing. I'm typing while true. So, I want music.pitch. I want to pitch. What can I get at that? Get it from the accelerometer. Don't get.
If I do that for 20 milliseconds. So, that's the strangled cat. And imagine, if you will, a room full of 11-year-olds on a Friday afternoon.
So, I've made a very simple musical instrument, okay? I need to mention now Mark Shannon. Mark is a contributor to the Python. He's a Python core developer-ish.
And Mark has done amazing work helping with this. And one of the things I'm going to show you now is something that Mark has contributed to the project. Mark did the display work for us, by the way. But let me just reset this.
Like that, going to do now.
We have a speech synthesizer. I can't imagine what children will get this device saying within the first five minutes.
The important thing is that it's inspiring them. That they go, well, how on earth can I get this thing to do more? I've made it say something, okay? So, the next thing I want to show you, whoops, is sing.py.
And I've plugged it into the wrong mic a bit. And this is going to be a recreation of the sound of music. And so, if I flash the device, we should hear some singing.
So, that's like the Dalek's best hits, isn't it? So, ah, it's smiling, good.
So, I have micro-bit one, it's smiling. And over here, I have micro-bit two, that are also smiling. I need to switch on and up the volume. Because somebody sarcastically shouted out the European national anthem just a moment ago.
These devices can communicate wirelessly. I am going to flash onto here a script called Conductor. And all it does is send a signal with the string go in it.
And these devices have, I've programmed them so that, ah, it's ready, it's smiling at me. That they will sing Beethoven's Ode to Joy for you. This is totally unrehearsed. Let's hope it works.
No, there's only one of them was working. We only got the harmony. It's got to be right, this. Let me reset, it's ready. Maybe it didn't connect, let's see.
Okay, in German, of course. So, I'm going to have to hurry up.
So, what has education got to do with you? I was having a discussion with some people on Facebook, and this is what I said when they said, why have we got to invest in education? Well, asking what sort of education and learning our community supports is how we decide what sort of community we become. It's through education and learning that we engage
with our future colleagues, friends, and supporters. This is very, very important, okay? And we need help, so I'm asking for help. We need help with the editor, with all the zeros, with the website, and with a place full of resources as well. And other cool stuff. We have a Jupyter notebook for Microbit as well
in the works. And I'm very, very pleased to announce that this week, everything to do with the BBC Microbit project is going to be open sourced by the BBC. That includes the hardware and the software.
Thanks to the BBC.
Thanks to the BBC. Everybody who attends EuroPython and has one of these tickets will get a Microbit for you to play with. If you would like to learn more about, a bit more technical information about the Microbit, I'm going to be speaking here in about two minutes' time
after this keynote. I was going to say, are there any questions? But you can ask me at the end of the next thing if you want to ask me questions. That's it. Finished. Done.