 All right, thank you very much. This is actually the last talk in this sort of session. There's gonna be some other things happening in this tent later on, but this is the last of the scheduled talks for today. And I have the great pleasure in introducing Dr. Lucy Rogers, who is going to present on Hacking Robot Dinosaurs. And I have to say, I have waited all camp for this one. So please welcome Lucy. Thank you very much. So I'm gonna take you on a little story. She says, if I can do this. One to two million years ago, dinosaurs were roaming the world. They were roaming here, they were roaming the South Coast of the UK, and they were roaming on what is now known as the Isle of Wight. The Natural History Museum has actually said that nowadays the Isle of Wight is the Jurassic capital of Britain, not Dorset the Jurassic Coast. So the Isle of Wight has got a big history and a big investment and interest in dinosaurs. This was of interest to a theme park, the world's oldest theme park, started on the Isle of Wight. And in the 1970s, there was a program called Blue Peter. And if you were a child in the 1970s, you would have seen on Blue Peter because in those days, there was only one or two children's television programs. You would have seen, or your friends would have seen, some fiberglass dinosaurs being airlifted in to the site of Black Gang Chine. Now it's sandwiched between cliffs and the sea, so the only way to get them in was by the helicopter. These carried on being there all the way through 70s, 80s, 90s, these dinosaurs. Put your hands up if you've been to Black Gang Chine and you've got a photo like this. Yeah, that's quite a few people. I gave this talk in Austria and there was still someone in the audience who put their hand up and said, yeah, I've got that photo. Move forward to 2012. The next generation, the fifth generation of Debelles took over the theme park. And they looked at these fiberglass dinosaurs and they realized that maybe they weren't, you know, as cutting edge as they could be. The Isle of Wight has a reputation for being about 50 years behind the rest of the UK, but the dinosaurs weren't helping. So they got hold of some animatronic dinosaurs, big robot dinosaurs. Everyone was really excited. Visitor numbers came up, but dinosaurs are grumpy. And they were all installed about Easter time. Just before the summer six, when 80% of the visitors come to the park, the main attraction, the big T-Rex, stopped working. The staff at the park have to be generalists. The park is small. And so the person who is the technical support also manned some of the rides, will probably also do some gardening. The painters will also work in the shop. There are everyone's multitasking. So no one had specific responsibility. So one person stood forward. He realized that this dinosaur had to be fixed. He'd heard of Raspberry Pi's. So he locked himself in a dark room for two weeks with a Raspberry Pi and taught himself enough Python to get the big T-Rex working again. This was amazing, but it was, will it work? Will it work for the whole six weeks? I have a bit of a reputation for hacking things, like dinosaurs, robots playing with Raspberry Pi's. And so they called me, Lucy, can you come and hack our dinosaurs? Yes. They knew that this Raspberry Pi was working, but they weren't confident on how long it was gonna last. What else was involved? I'm a mechanical engineer by training. So although I play with the Raspberry Pi's, I play with coding, the mechanical bit is much more my thing. The coding bit, not quite so much, but I know an awful lot of hackers and makers. And I know that they like dinosaurs and that they like cake. So the theme park provided the cake and the dinosaurs and I got a group of makers together and we all went down to start hacking the dinosaurs. The theme park, as I said, is quite small. So their budget is small, but cake they can do and cake we were happy with. So I've now got a video of that first hack session that we had at Black Gang Chine. My name's Alexander Debell. I'm fifth generation Debell family at Black Gang Chine. I have asked some people to come down and hack my dinosaurs. Obviously, this dinosaur here came and the rest of them all came with their own electronics and their own control gear. But what we wanted to do was to see what else we could do using the Raspberry Pi and to get more control over it. We've got a few people down today for a Raspberry Jam where they are having like a little hacking session and they are learning a coding program called Node Red and they're going to use that to try and make some of our smaller dinosaurs do some cool things. The plan for day two is for the guys who have been learning the Raspberry Pi today to use what they've learned and make this dinosaur a move in whichever way they want to and make some sounds as well. I'm modifying a box that Mark started work on yesterday. So he's already modified one of the dinosaur controllers to put a Raspberry Pi inside it and that's worked really well. But it's actually out in the park doing work for all the customers in the park at the moment. So in here we have the sensor input which goes down to some simple circuitry just to pull the voltage down to five volts so it's safe to apply. It goes into one of the inputs on the Pi just here and then here are the all the outputs that eventually through a relay goes to the motors through here and then all of them out of here and then through to the dinosaur moment. He wanted to carry on and modify some of the other dinosaur boxes to do the same thing. He couldn't be here today so I'm carrying on today what he started yesterday. Other people in this room are working on the software to go on the Raspberry Pi so when I finish the hardware they'll upload the software on and that software will choreograph the movements of the dinosaur to actually make it a bit more sequenced than it was before. One is an inject node. That means you can inject a message into your program so they're on them to have real sensors plugged into it. You can simulate those messages just testing it out. I've got a bit of a computer background so I've got the basics of how things work but obviously the language and that's all new. But the program that they've given us here is very easy. So are you hopeful you can get a dinosaur to sing a song? Yeah, no problem. That's tomorrow's job. Yeah. Hi, which the speech synthesis. So I'll just put I'm a dinosaur into it and set the pitch low and then let's come out. Can I hear it? Can I hear it? I am a dinosaur. No, you can't do that. So what's happened then? What have we done? We've basically we've set it up on it's on a timer. So like every few seconds it'll activate a different motor and then we can we can also edit it so the sounds will come at a certain point like when the mouth opens, which we haven't done yet. I might have. Oh, man, that is so cool. Yeah. Heal. Heal. Now fetch. So some of you may have seen Debbie Davis yesterday. I'm not sure if she's still here, but she was giving a talk and James McFarlane, who was also starring and that was giving a rocket demonstration yesterday. So we've got various hackers involved. What Black Gang had actually asked me to do was to make sure that the electronics was reliable enough for the summer six to also train the staff so that they could program the dinosaurs to do what they wanted rather than getting expensive consultants in every time. And also look at how we can make the electronics more sustainable. At the moment it was here's an electronics board. It's full of 1980s electronics. They've got to phone China to get a new board sent back over and that takes six weeks. So that's not really sustainable. But with a Raspberry Pi and with some other electronics, they just want to be able to grab something off the shelf if something goes wrong, put it in. So I started with training the staff and as I said, they're not necessarily with a technical background. They don't necessarily want to learn coding. They might be the fiberglass of the carp into the gardener, but they want to be able to program these. So we started with a LED Raspberry Pi and lighting an LED. And we moved on from that to, okay, how do I now use the GPIO pins, the general purpose input output pins on the Raspberry Pi to control something bigger than an LED? This is an open collector driver. I've discovered I was making these time and time again to control motors from the Raspberry Pi. It's effectively just a switch, a big relay if you like. I've called them thingatrons because I can use them to connect my things to the internet. And this is the setup that I've got here on the table. I've got a small mapline dinosaur that costs 10 pounds, a small kit that I've hacked, a Raspberry Pi and some traffic lights. And I'll go through some Node-RED with you just to show you how we can do this. This is Node-RED. It comes as standard now on the operating system, Jesse, for the Raspberry Pi. So if you've got a recent download of Jesse on your Raspberry Pi under programming, you'll have Node-RED there. The first hello world example that we all do, we want an inject node, that's changed its name to a timestamp, a debug node, and then we draw a line between the two, and my Twitter rate limit had better not be hit in another five minutes. Deploy. And we can see over on the right hand side that there's a number come up. That's a timestamp. I can change that to be a string, hit deploy, inject, and hello world comes up here. So I've done my first hello world just by a couple of clicks. Taking this one step further, I now want to turn on a GPIO, I want to send a GPIO pin high. So if I scroll down, I've got the Raspberry Pi GPIO pin. Now to turn it high, I want something that's a one, so I'm going to change timestamp to a string, put a one in there, that'll be on, copy and paste, want to turn it off again, connect those through two, whoops, cancel that. So I was just checking there, which pin I'd actually used. I can select any of the GPIO pins. So I want GPIO pin 35, it's telling me it's already in use because I've got my backup already saved. Deploy that. Now click on, my red LED comes on. Life coding, yes. Off and on. So next, I want to control my dinosaur. Very similar thing. I've got that one on pin 26. So I just need another Raspberry Pi GPIO node. I'm going to connect them both to the same on and off, so the lights will go on, as well as the dinosaur. Deploy that, so turn everything on, and my dino nods, and turn it off. All very well when you've still actually got access to your computer. Now I'm actually, the whole of the software of Node-RED is running on the SD card on the Pi, and I am connecting over, just over the web, so I can access that Pi from my web browser. So I can do it, connecting the cable in, I can SSH in, but this way, less cables is all good. But what if I don't want to be around? What if I want my dinosaur to nod every time I get a tweet? Well, Node-RED, which I'll just say, Node-RED is open source. It was written by some people at IBM, and they wrote it because they found that they were using the same commands, the same libraries, time and time again, and a lot of the computer people at IBM are now using Node-RED. So it's a lot more powerful than just making some lights come on and off and turning my dinosaurs on and off. They're using it to quickly prototype something to see if something works or not. They're finding it much quicker than actually typing in. So this is a Twitter node. I need to authorize it, and I'm going to look for Wake Dino All Small Letters. So if someone wants to get their phone out, and if my Twitter rate limit hasn't been too badly hit, which I think it has, oops, I can't do that yet, what I need to do, the message that's going to come through from Twitter is going to be whatever you type. The GPIO pins only accept a one or a zero, so I need to change. Whatever I get, connect that up. I'm going to just change whatever you've written to be a one. I'm also going to put a debug node in here to see if we can see if anyone has typed anything and it's picked anything up. And I'm going to put that up to there. So if someone tweets, and still not yet because I haven't deployed, it will come, the Wake Dino, the Twitter node will pick that up. It'll go to the set message payload and change that to a one, and that one will trigger the GPIO pin, which will open the switch, which will let the Dino start nodding. Now, because I want to automatically turn that off, I'm going to put in a delay node, move my payload up there. So after five seconds, I'm going to want it to automatically turn off. Need another change, and I'm going to set it to zero, connect those two, not those two, connect that one to the pin 26 with the Dino. Right, let's put pin 26, that's the Dino. Let me label that as excused. When a message comes in on the email, on the Twitter node, it will get changed to a one, turn the GPIO pins up, but there'll also be a delay of five seconds, change to a zero and turn it off. Now, because it looks like my Twitter rate limit is still being hit, I'm going to put in and force it. So I'm going to put a timestamp in to there and there, deploy that, and so in the world when there isn't Twitter limits, the Dino will nod for five seconds, hopefully, it's a very long five seconds. It's still a very long five seconds. Thank you. There we go. Deploy that one. Who has already used Node-RED? Oh, good. That's not too many. I just suddenly thought I was teaching you all to suck eggs. And it stopped. Hey! Okay. That's the basis of Node-RED and how to drag and drop. Let's go back to that one. That was the hashtag. So after I went, did this first hack session, I was invited to go to China to actually see how these big dinosaurs were being made. And it was fascinating. You come to this huge, huge warehouse and there were these huge, huge dinosaurs in various states of being made. So you can see in the background there, there's some dinosaurs. I'm not going to try. I think they're bontosaurus, but I don't think they exist anymore, so they've probably got another name. But in the foreground, you can see slightly that there's some pink foam that's in square blocks. That hasn't been shaped yet. And behind the tail of it has been shaped and colored. But they had all sorts of great toys there. I wasn't allowed on this one. I was allowed on this one. It was a little electric motor and you just revved it up like a motorbike and went round. It was great fun. Sadly, the video got lost. So this is what's inside these big dinosaurs. A skeleton of metal. The eyes and the motors are all put in first. Then as I say, the blocks of foam are put on next and these ladies here are putting the foam on. And then it's all carved. And now the first few steps I can understand. I can say, yeah, I can see how you can make the skeleton. Yeah, I can see how you can put these big blocks of pink foam on and I can see how you carve it. But then some magic happened. Somehow, it went from a bright pink bit of carved foam to having some ladies tights put on it and some glue put over it. Some magic happened and they became dinosaurs. I couldn't put my finger on where this magic happened. It just did. So big dinosaurs are great fun and the theme park has about 25 of them. But I wanted one. So I got hold of a small one. This is Dee Dee, the desktop dinosaur. She was made in that factory in China. Underneath, there is a truck windscreen wiper motor that controls her body. Not quite sure what's inside because I haven't dared to slit her open and find out. This has the same controls as some of the ones at the theme park, some of the bigger ones at the theme park. And I'd got home after that first hack session and I was playing with the software and I thought, I want to see it actually work. And so this is why this one got ordered. You can see in the picture that those little orange things are the same thingotrons, the same open collector drivers that I've got on this little one here. So it's using the same switches, just quite a few of them. So let's see if we can actually talk to this one. I've already programmed it. So hopefully, hey, that's her tail on. She's got a sensor in her mouth and if you can see on the screen, it says draw sensor and underneath it says a little one. If I do that again, the sensor goes to zero and then when she close her mouth, it goes back to one. So a bit later on in another, here, in that mess, I've got to turn off when the sensor goes to one and we can turn her body on and the body has also got a sensor in it. So I couldn't register those sensors with just the thingotrons, the open collector drivers that I made. And so James McFarlane made some extra electronics to take care of the sensors, but also these thingotrons wouldn't have powered the 16 amp motors that are in the huge dinosaurs. So I got asked, make sure that the dinosaurs are going to work for the rest of the summer. We did that. Train the staff so that they could use it. Well, they now know how to use Node-RED and they can use it. When we were at the Node-RED, the first hack session that we had, we had Andy Stanford-Clark from IBM there and someone had said, what we want is when we walk past the motion sensor, we don't want it to do the same thing every time. We want it to be random. We want to roll a dice. So Andy and his colleague, Dave Conway-Jones, who was not at the session, it was over one weekend, they were emailing each other and tweeting each other. They actually wrote a Node called random that is now in, she says, finding it. It's in there somewhere. There it is. There's a random Node that's now being designed and is in the standard build because the people at Blackgang wanted it and it got made there and then. We can also put in function nodes. We can also put in function nodes and you can type in your own JavaScript. So if there isn't a Node that doing what you want, it's there, you can type it in yourself. Okay. If anyone wants to, let me turn those off. Put that on, that's on, that's on. Let me turn everything off. If anyone's got Twitter up and ready, if you do hashtag DD raw, this one down the bottom, hashtag DD raw, hopefully something will happen. Can you wave when you've done it? Someone. The raw works, but the dyno didn't wake up. So let's, oh, there we go. Yeah, it's working now. So she now opens her mouth and roars at the same time to a tweet. And if I do that deploy, if someone tweets, if someone tweets hashtag EMF camp, this is what it should sound like. I'll do that again. I am a dinosaur and I love EMF camp. Thank you very much. Thanks very much. Does anyone have any questions or they'll take two very quick ones. I will also run. I was just wondering if the state of the art in animatronics has improved since blue Peter. So, or is it all CG effects and stuff these days? I'm sorry. Can you repeat that? When you went to China, has the state of the art in the animatronic dinosaurs actually advanced in the last few decades since blue Peter? Have just a little more realistic and it seems that all the efforts have been poured into film kind of computer graphics instead, but you know other dinosaurs moving more realistically and stuff than the ones we saw in blue Peter. This company in China only makes animatronic dinosaurs and they sell them around the world. What's inside them is very basic. So, the electronics from the 80s, the truck motors. What they're really, really adding is the artistic bit. I'm trying to now work with them to use the electronics and the electronics that James made to start with was the prototype. He's now made a more robust version and we're trying to sell that to the Chinese so that they can put that in around the world. So, hopefully they'll be using, it must be pieced, a simple touch bridge and then anyone can use the dinosaur. Any other questions? No? Oh! Sorry, you're hiding behind the camera. Can you think of anything more anachronistic than a tweeting dinosaur? Next question. All right, I think that looks like about it actually. So, thank you very much. Can you please join me in thanking Lucy?