 Okay, everyone. I Am really happy to Introduce Nicholas Toloway, and he's going to tell you about an amazing story about on One million kids and the micro bit, so please give a big hand for Nicholas. Thank you Well, good afternoon Euro Python 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 school teacher and this is me on my first day as a fully qualified teacher with my new form And these were a bunch of an 11 year old children in what in the UK? We call year seven. So year seven 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 time when I left either So I'm not the only person who's spoken at Europe. I think 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 raspy pies 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 no Riley 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 micro computer 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 was going to do so this is a simulation of a BBC micro and I'm gonna 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 BBC basic What goes on line 30? Go to 20. Yes, okay I've insulted you all there we go so David Allen who is 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 I Could tell people that they're 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 a 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 micro bit project. And this is the trailer that they've been showing on BBC TV over the summer in future Hover shoes click button hologram of your name comes up shows 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 issues trampolines shoes that would hover that is Robert 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 seven in the UK the eleven-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 while becoming consumers of technology and not asking what this technology can do So we sort of cherish creativity and exploration over rote learning and tests things. So how was this delivered? Well, I Could 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 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 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 your Python And 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? Hmm so I was in a bit of a pickle there, but I'm I met somebody called Johnny from arm. That's how we introduced himself. Hello. I'm Johnny from arm. It's a strange surname. Anyway, he He lived next door to a chap called Damien George Johnny is the person who designed the hardware for the micro bit and Damien as I'm sure some of you know created micro Python And I've met Damien at Python UK. So I got in touch with Damien and Damien got hold of one of these devices and We got micro Python to run on the micro bit, which is remarkable Let me tell you a little bit about micro Python So Damien is actually a physicist and he he created micro Python as a sort of a side project and It's rather a 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 is a remarkable achievement and Damien is an outstandingly talented developer He ran an extraordinarily successful Kickstarter Where he raised enough money to actually get get micro Python out into the world on something called a pie board Like I said as 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 Damien's talent and determination that micro Python 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 their code is and they click the download button They get a hex file that they copy onto the device and then the program runs Okay, 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 Damien and I met in London just before we went to a meeting to the 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 Very mind that we're all volunteering our time here as well So this is all all about motivating a community to get involved to so you've kind of got touch develop Which is Microsoft offering into which we slotted that web-based Python editor But we 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 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 But we needed projects to inspire others as well And we needed a website to sort of spread the Python in education word. So we got to work. This is me 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 sorts of types of Python development and So what you will see is when I'm doing the live code demo in a minute, I'll be using you to make that happen Oh So I also want to mention that While mew is the whole philosophy of mew 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 zero MQ again It's a very thin wrapper on the top, but it's child friendly. Okay, so we're asking ourselves. What other things could we zero as well Maybe you can put your thinking hats on and come up with something something else zero. That's a child friendly Library for kids to use and so the The summary is it's a child simple friendly simple child friendly API's on top of real modules Remember I mentioned tooling so this is micro flash 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 micro flash to do it yourself Now most of the work on micro Python on the micro bit was done on one single device Which Damian had and the BBC gave the PSF five 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 micro bit went all over the place at 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 a Radamir from Poland Created a robot which I was going to show you a video of but this morning actually Radamir turned up and he said you've seen this and This is his little micro bit robot But he's 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 Radamir wherever he is The important thing is that it's the micro bit that's controlling this it's controlling the motors here The GPIO pins here if you look very carefully there are bolts here making the connections with the with the motors And with the help and support of the Python software foundation We create we are in the process of creating a Python in education all website This is the initial design for the home page 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 micro bit But for Raspberry Pi and all the other amazing Python in education things that are happening around the world in a single place so people can Can be inspired and reuse these resources So this is demo time You don't know how nervous I feel now so the problem of having a Micro bit 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 five by five LED matrix of these flash you can have Zero to nine brightness a couple of buttons for input across the bottom our 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 Radio so you can communicate wirelessly with 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 Okay, so that's the 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 Hello Well, hey, it works. Just fancy that okay But we can't we don't have to just scroll text we can do animation as well. So display dot show We've got some built-in images all clocks is an it's 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 Little radar there we've got going okay, so it's going to just keep doing that until I tell it to stop um 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 them like a bit is very very simple Just to show a random image from this list here if button B was pressed or hello world Accelerometer was gesture shake. Okay show an angry face. Let's see what happens when I do this a Oh, we got a smiley face Face with his time rabbit oh a pac-man ghost and so on and so on and Be we 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 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 repel. This is Python running on the micro bit. So displays clear and What I can do is I used to be a musician Okay, and so what I love doing is making music 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 Dot we have tab completion, by the way Okay, somebody pick a tune I Can't hear all of you Wow wow wow What what what should be? Satron bone 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 orchestra, but I can start to do interesting things like this Yes, I know Well, whoops while true, I'm trying to type here without looking at this thing I'm talking while true. So I want music dot pitch. I want to pitch. What can I get it back to get it from the accelerometer get X And if I do that for 20 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 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 That 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 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 This is going to be a recreation of The sound of music and so if I flash We should hear some singing So Like the Daleks best hits isn't it? so It's smiling good. So I have micro bit one is 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 it's ready. It's smiling at me That they will sing Beethoven's O 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 It's ready. Maybe it didn't connect. Let's see Okay in German of course so I'm gonna have to hurry up. So what does 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 how we decide what sort of community we become For it is 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 help with the editor with all the zeros with the website and with the place for thought resources as well and Other cool stuff. We have a Jupiter Notebook for micro bit as well in the works and I'm very very pleased to announce that this week Everything to do with the BBC micro bit 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 Europe Python and has one of these tickets will get a micro bit for you to play with if you would like to learn more about a Bit more technical information about the micro bit. I'm going to be speaking here in about two minutes time After this keynote I was gonna say are there any questions, but you can ask me the end of the next thing if you want to ask me questions That's it finished done