Daddy, where is my Arduino?

Uri Nativ & Roni Nativ · Reversim Summit 2018 transcripts · Markdown

Human subtitles from YouTube. Click a time to play the video from that point.

00:11 My name is Uri, and I'm glad you've stayed till the end of the day, to the last lecture of the day to the, really, coolest lecture of the day. As I've said, my name is Uri Nativ. Married to Tamar, father of Ittai, Roni and Roei. and for this lecture, I'd like to invite, to lecture with me on this stage, my daughter, Roni. How are you doing Roni? Good. How are you? Excellent! Well Roni. If you can swtich to the next slide, I've made a slide where I can present you. This is my daughter Roni. Hey! What's that? Why is it pink??? And with hearts??? So ugly... Pink... because you're a girl... You like pink. Girls like pink. What do you mean "Girls like pink"??? I HATE pink! Let me fix the slide. Better. You can continue. Sababa. So this is my daughter. Roni. She has over 12 years of experience.

01:15 She writes books. An excellent student. Plays the flute. Has read millions of books. And the thing I'm most proud of, is that she's a Star Wars fan. Roni, is what we call today in our industry Full Stack Kid. Roni, I've made a slide where you can present me. If you can switch to the next slide and just read what's written. This is Dad. He has a startup called Torii. VP Engineering. Over 18 years of experience. Rock star developer... Javascript ninja??? Daddy, what is all this nonsense? Just read it. Let me fix the slide. Much better. Roni. It is... hmm... pink. Right... you like pink. It emphasizes your eyes.

02:17 no... move to the next slide please. Ok. Fine. What do you think? hmm... this looks worse. Roni, move to the next slide please so we can move forward Ok. I'm sure you gonna love the next slide. What do you say? Roni, don't touch. You're just making things worse. Roni, let's tell the audience why are you here. I'm here because I'm your gimmick. WHAT? If I hadn't shown up, they would not have accepted your lecture... Roni, I've asked you not to tell this in front of everyone. Let's try this again. Why are we really here? We're here to show you how to teach your kids to program, in a fun way. Excellent. So before we begin. Let's see who's in the audience today. Any kids in the audience? Are there any parents in the audience?

03:17 Respect. Is there anyone here who was a kid? Excellent Roni. We got the perfect audience. Let me tell you something... When I was a kid, there was no internet, and... Ok dad, you've told this story a million of times already. There was no internet, no computer, no smart phones, you used to ride a carriage Stop, stop. You are a bit exaggerating. But really there was no internet, and not every home had a computer. I was lucky, that my parents, who by the way are sitting here in the audience, Roni's grandparents, have brought to me and my brother a computer This very small computer, Sinclair Later on we were upgraded to Apple. On these computers, we've learned to code in Basic, in Logo, we copied code from books... Ok dad, we understand it. You are old. Today, if you want to learn how to code, everything looks totally different. There are many web sites today that can help you learn how to code in a very simple and fun way. You don't even need to write anything, as we'll share all the links later on.

04:22 Among all those sites we have... code.org Scratch Code monkey Swift Playgrounds Lego Mindstorms Khan Academy and you can even play on bananas. wow, wow, wow Roni. So many resources of information. What is this nonsense, playing on bananas? Yes dad. I'm serious. You can really play on bananas. I don't think so. Yes. Do you want to see? hmm... let's try... I'll play you something. Daddy, where is the C note? Daddy! That's one of the bananas! It's part of the piano. I don't think we can use this one anymore. ... I didn't have time for lunch today...

05:23 We've run out of bananas. We do have an eggplant. Dad! It will work. I'll play you something. Let's see if you can recognize it. Throughout this lecture, we'll have a few demos.

06:25 Every time something works, it's actually a miracle. your applause helps. What's we've seen here, is Roni playing on bananas connected to Arduino. Later on we'll explain how it works. Whoever wants, can buy a kit called Makey Makey which allows you to connect the physical world to the digital world. You'll be able to play on bananas, and apparently also on eggplants. We've built this one ourselves using Arduino, and we'll later on explain how it works. Roni, you showed us many information resources, so before we show people from where to learn maybe we should first talk on how to learn We divide learning into 3 categories The School method, The Gamification method, and the Projects method. What is the School method?

07:26 The School method, is probably the method you know from.... ... school. In this method you have material to learn, a syllabus, you are being taught, mostly theoretical staff with some leap-of-faith, that this can be used in the future for something practical. This is how we learned in school, this is how we learned in the university, and in many cases, this is how we're used to learn at work. The resources are are enormous, many sites give you online courses. Khan Academy, Udacity, and for kids we highly recommend - code.org. Yet we need to remember, that what seems natural to us, as adults or parents, as the way to learn programing, or to learn something new, this might not be the optimal methods for kids. In order to learn in a course, you need a strong motivation. It can be external, like homework and exams. Or internal, since in university you wanted to succeed,

08:28 or at work there is something really important you need to learn. So however tempting it may be for us parents, many times, when we want to teach kids to code, "He's a course" You need to remember that this might not be the best method to begin with. Therefore, we have a different method Very fun, highly recommended, the Gamification method. In this method, you learn to code, through the world of games. We can divide this method into 2 main categories: The world of physical games, and the world of digital games. In the physical games world, there is a great selection of games, We'd like to recommend two of those now: Wonder and Lego Mindstorms. Wonder: that's a few small robots with built-in camera You can program them to perform several actions. Lego Mindsotrms: that's the same old lego you all probably know

09:29 But this one comes with a small computer, which you can program it and by that, build robots The good thing about the physical world of games is that is suit any age. for any age, you'll be able to find a game that suits Even my cousin, Shy-lee, only 5 years old Is already building electric circuits, using lego like parts That's not real coding yet, but that's a good foundation for this world And in the world of digital games there is a great varaiety we'd like to recommend three games, which are well known Code Monkey, Scratch and Swift Playgrounds We'll start with Swift Playgrounds it is not much different from many other games you can find Those teach you how to code by playing a game In most cases, you have a character that needs to pass challenges solve mazes, kill monsters or collect items

10:30 What's great about Swift Playgrounds, is the fact that it comes with your iPad which allows you to have your kids learn already It mostly suitable for older kids, middle school and high school My other kid, Ittai, Roni's older brother will be 15 soon, and this is how he learns Swift The next game is called Code Monkey and some of you may know it already that's a game in which you need to program the monkey to reach to the banana It starts very basic where you might only need to tell the monkey to move a few steps towards the banana it advances in the difficulty level to the point where you need to use loops, functions, variables and more What's nice about Code Monkey, is the first and foremost, it is an Israeli company and that's cool Next, they are working in conjunction with the ministry of education and therefore your kids might already know it from school

11:31 They create a competition between the classes and between schools, as well as a national competition which give the kids motivation to be better Of course, kids at lower grades only accomplish the first levels but in the higher grades, they manage to accomplish very nice and advanced topics The next thing, is Scratch Scratch is a visual programing language Where you program the cat or any other character in the game using blocks in order to complete several actions With Scratch you can create many games and other cool staff Scratch is great because it is excellent for kids all the programmable building blocks are grouped by categories and colors So you don't really need to write anything. Just drag the blocks to the working area For example, in this Scratch code

12:32 we position the cat, or any other character, in a certain position then we run a loop until the position of the character on the X axis is larger than 50 and then it says "Hello World" and this is how it looks Thank you, though it is not as impressive as a live demo that was a recording With Scratch you can create additional games and more complex like this game where the character need to dodge the balls it has limited number of lifes and score it achieves you can create a lot of staff Scratch is amazing. I wish that I, as a kid, had this learning environment this visual language you can create games we highly recommend, for those who want to learn Scratch

13:34 to go to the site called Tynker that's a commercial company, with paid online courses courses that are well suited for kids, in a world very similar to Scratch they have created a Scratch clone which is much more rich in its offering more characters more colors more sounds, so you can create really cool and fun games with courses that teach you as you go Scratch is good for children in elementary school who just want to experiment with code and also for kids in middle school and high school who haven't tried coding before then this is a great starting point since it is very easy to create with it and later on they can switch to more sophisticated programming languages We can't talk about Scratch without mentioning its creator This is Mitchel Resnick Mitchel Resnick from MIT labs He created Scratch, in order to come up with a new paradigm on how to teach programming to kids

14:40 He says You don't need to teach kids like we teach them in school, we should come up with a different method He wrote an article. Very short, and worth reading on the 4 P's Projects, Passion, Peers and Play He explains that in order to teach kids have the learning around a project Pick something with a beginning and end something you can create something you can be proud of at the end Create something. The second thing is: Passion Choose a project the kids love where there is an enthusiasm around it Something they want to create. Peers: don't let them learn alone Have them learn in a group. With friends. Or like me and Roni, where we've learned together So common, father and daughter, mother and son, any possible combination You are each other's peer And the last thing: Play Let's create games.

15:40 Because that what kids like, and that's fun. So this is how me and Roni have learned. and this is the third method we'd like to introduce to you, and that's highly recommended. The Projects method. And now is a good time to present you with the Arduino Why Arduino? We wanted to create projects in the real world There is something very fun about creating something physical Like you've seen with the banana piano There is something fun about it. something you can show later to your friends you can take it with you and show it to your grandparents it is the feeling of creation a bit of craft work, a bit of coding work Is there anyone here who knows what is Arduino? Has anyone ever programmed an Arduino? Cool For those who forgot and for those who didn't raise their hand let's explain to you, really in 2 minutes,

16:40 what is Arduino. Arduino is a micro controller What's unique about the Arduino, is this chip which you can program You write code on your computer, upload it to the Arduino, and then the Ardunio can run the code, even after you've disconnected it from you computer another thing about the Arduino: it has pins. Those pins can function as inputs or as outputs. What can we do with input pins? We can connect various sensors to it I can connect a distance sensor, light sensor, temperature sensor, and also a GPS as another kind of sensor And what can I do with output pins? I can connect a speaker, I can connect lights, LEDs, I can operate engines. The last thing worth pointing out in the Arduino

17:42 is that is has a USB port, which we can use both to power the Arduino and also to upload our code to the Arduino. Now, if for example, we want to light a LED using the Arduino All that we need to do is to take the LED, connect one of its legs to one of the pins, in this case, that's pin number 13, and we'll define it as output, as we want to light the LED. And the second leg, we'll connect to the ground, in order to close the circuit. That's how it looks in diagrams, that's how it looks in reality. What's also nice, is that we work with Jumpers, little wires that we can connect and disconnect. You don't need to do any soldering, and the kids can work with it very easily, and you don't need any soldering knowledge. This is how an Arduino code looks like. This code make the LED turn on and off.

18:46 The code has two main parts: The Setup, which runs when the Arduino boots. And the Loop, which runs forever In this example we want the LED to turn on and then off. We start by defining the pin to which we've connected the LED. In our case, that's pin number 13. Then we define pin number 13 as output. Inside the loop, the first thing we do is turning on the LED, then one second delay, to keep the LED on for one second. Then, we turn off the LED, Next, we add another one second delay, to keep the LED off for one second. This is how the complete code looks like. It makes the LED turn on and off, forever. With Arduino, you can create a lot of different projects. For example, you can create a small robot with a distance sensor, so it won't hit the wall. You can make an automatic watering system for your plants

19:46 that will water your plants every morning. You can make a smart door lock, which you can unlock using your phone. You can also control your air condition, using your phone, like daddy did at this work. Yes, I know you like to make fun of this project, but we come to the office in a hot summer morning, so we made it possible to control the air condition using the Arduino. We connected the Arduino to Slack, whoever arrives in the morning, sends a Slack message to turn on the AC, and then you walk in to an air conditioned office. Ok dad. Are we done with the commercial to Torii? Yes.... you can continue. With Arduino, you can even make the perfect breakfast.

21:00 That was Simone Giertz. We highly recommend you to follow her YouTube channel, and watch her TED talk. Simone usually builds robots, which in most cases are useless, stupid and usually don't work. She's using Arduino for many of her projects. It is definitely worth watching an inspiration for projects you can make. Roni, I think that's a good time now, to present the projects we've made. We'll start with the first project, that you've already seen, banana piano. At this point I assume you all wonder, how does it work, and where the hell do you buy those bananas? Let's explain it to you. There isn't too much code here, just a bit of physics. We rely on the fact that the human body,

22:00 and Roni's body, conduct electricity. If we take two pins in the Arduino, and connects them together, and we measure the time it take for the current to move from one pin to the other, and the second pin is also connected to the banana. When Roni touches the banana, she acts like a capacitor. Some of the current flows to her, and now it take more time for the current to move from one pin to the other. We detect this change, which tells us that Roni has touched one of the bananas. This patent is similar to how you smart phone works. The touch screen is a capacitive touch screen, which uses the same principal that the human body can acts as a capacitor The computer detects on which banana we touched and sends the relevant note according to the banana

23:02 For example, the fist banana is the C note the second one is D note and so on, until the eggplant. Our second project is called LEP. LEP is an acronym for LED Puzzle. It is a game built out of LED matrices. This game is an original game based on the idea of my friends and mine. We decide we wanted to build a puzzle out of LED matrices. What is a LED matrix? You probably already know a single LED. If we take several LEDs, In our case that's 8 by 8 LEDs. I create myself a small screen out of LEDs. If I take 4 of those matrices together, we'll have a bigger screen. We started making the game. We started by connecting the LED matrices to the Arduino started to understand how to operate them, How to displays shapes.

24:03 Then we started making a game out of it. We took a shoe box, buttons, LEDs, and the matrices of course, and made a game out of it. In the game you get a mixed shape, and by pressing the buttons, you organize the shape back it its original form. Every time you succeed, you get one point. and a new shape. and then, when the game is over, after one minute, you see your total score in the game. The game starts when I press the button. Roni pushed the button, she gets an indication: 3, 2, 1,... the game has started. Each turn she gets a new shuffled shape on the screen. Using the buttons around the screen,

25:03 she controls how to organized the shape. The left button, switches between the left matrices. The top button, switches between the top matrices on the top, and so on. That's how she needs to organize the shapes. Every time she succeeds, she gets a point and the score will be displayed at the end. There are also 3 LED Green, yellow and red. When she started the game, as it is a time based game, the green light was on. After half a minute, the yellow light turned on. When time is about to end, the red light turns on. In the last 5 seconds, all the LEDs flashes, which warns her the game is about to end. Game Over is displayed, and he score. 14!

26:07 This score might impress you, but not Roni, she played very slowly on purpose, she can prove it after the lecture. The next game is: Simon. For those who were in the lecture with Moran and Jonathan, you got a little reminder about Simon. Whoever lived in the 80's, like me, have probably played with it. And for those who haven't lived in the 80's, which is probably most of you, we'll explain what it is. Simon is a game, it was released in 1978 whoever lived in the 80's must have played it. It has 4 buttons, 4 colors. The game gives you a sequence, that you need to repeat. At start, for example, you'll get Yellow, you need to press Yellow. then you might get Yellow, Blue.. You'll need to repeat the sequence Yellow, Blue and so on. If the previous game was an original game this time we've cloned an existing game.

27:07 a retro game, a game for dad. So daddy decide we've building Simon ourselves We bought as simple wooden box in a craft shop We drilled holes for the buttons, sprayed it with black paint to look like the original game then we started connecting things We connected the buttons to the Arduino we wrote code that every time we press a button, the light turns on. This is how the game looks from the inside and this is the final result. Go for it.

28:10 First of all, Roni disqualified herself for the demonstration. A few things worth mentioning The colors are the original colors for some reason the green became turquoise on the screen you are welcome to the stage later to see it for real. We tried to clone the game, as-is. Same colors, same positions, same delays, same note for each button and the same timing, that increases as you continue. One of the coolest thing about making a game yourself, is that you can enhance it. One of the modes we've made for Simon, is the ability to play 4 kids in the same time Each kid gets a different colors that's his color Once a kid make a mistake the kids is disqualified together with his color only 3 players are left then 2 players until only 1 player remains. Cool, right? That's very cool and it works. Only later to figured out it was also in the original Simon. and we are not so creatives after all. Now, for the next project.

29:14 As short disclaimer: The demo probably won't work and we'll show you a video instead. We're depended here on the gods of demo the gods of Wifi and many other moving parts Yet, before we start, we probably need to expose something about Roni which she has never talked about in public it might be a little difficult for her. Roni, shall I say it? No. I should, it is part of the lecture. I'll say it. No. You will? ok. I'm bad playing rock, paper, scissors. What? I don't think the audience has heard you. I'm bad playing rock, paper, scissors. Roni is plays bad rock, paper, scissors. How bad? Every time I play against her she plays scissors even if I tell her she's going to play scissors she still plays scissors

30:14 Therefore, we present you with the next project a machine that will help Roni to learn Rock, Paper, Scissors I guess you are all familiar with Deep Blue, which won against the Chess world champion Alpha Go by Google, which won against Go world champion We now present to you, on this stage the HPB 9000 A device or a machine that will win or loose to a human in Rock, Paper, Scissors What have we built? We went to the nearest store AliExpress We bought several parts We bought a flex sensor a sensor that measures the amount of bending you can image that if I put it on my fingers I will be able to know when I bend my finger

31:16 We bought a shake sensor, or a vibration sensor it detects vibrations when things move, or stop moving and a device called NodeMCU which you can think about it as a small Arduino same thing, but smaller and has built-in WiFi We took all these parts We assembled them together and we've created the ultimate glove No Roni. Not this glove. We've created the ultimate glove That's probably not that one either We got something much better Roni, show the the glove. What you see here is a wearable computer

32:16 worth a few dollars We'll give the demo one chance and if it doesn't work, we'll show you the video What I'm doing here What I'm doing here is playing against the computer Rock, Paper, Scissors My movements The Arduino, or the NodeMCU in our case Detects if my hand is straight is doing scissors or rock It detects when I shake my hand and when I stop and sends the relevant command to the server which my brother, Alon, has written We'll share this video later Believe me, it works with Wifi

33:20 I think that's a good time to recap Do you want to tell us what we've seen? We've said that in order to learn to code there are 3 main methods The school method the gamification method and the projects method Remember, what seems natural to us as a way to tach kids to code is to find an online course we need to remember that this might not be the best method for kids It might be great for us as adults but kids need something else Remember the world of gamification that has a lot of resources which allows you to learn many programming languages but our best recommendation is to find a project It can be a project in the physical world

34:20 It can be building a web site Work with your kids and make something You'll see that this experience is amazing Roni, maybe you'd like to add something on a personal note would you like to say what have you learned? Ok I've learned that developers are lazy What? Yes, you've always postponed everything to the last minute I had to remind you that we need to rehearse Roni. That's not true Why are you saying that in front of everyone? Daddy that's true, even mom says that. Ok. I should probably not argue Let's try it again Roni What have you really learned? I've learned that we need to work as a team with patient and to work in really small steps because everything works out eventually and the result really worth it My father says, that there aren't enough women who code

35:20 Maybe from the outside before I learned about this world just looking from the outside I can understand it as it doesn't seem like a world girls would try But now, when I have more knowledge I understand that this is not a world of boys or gilrs it is simply a world of creativity this is a world of imagination and fun you can create any project you like you can really make anything We want to end with a paraphrase on the famous quote of Antoine de Saint-Exupery Antoine de Saint-Exupery, the author of The Little Prince said If you want to build a ship, don't drum up people to gather wood, and give orders. Instead, teach them to yearn for the vast and endless sea

36:21 And we say If you want to teach kids how to code, don't preach them about computer science and algorithms Instead, teach them to yearn for the vast and endless world of creativity. Thank you very much

← Being a Generalist Developer - is it for you? · REST in peace? - cause APIs are much more than REST →