Streamed live 8 July, 10:30 am AEST
Click to toggle workshop transcript
Hello and welcome to the EduKits Interactive Coding Experience. I’m your host Michael, and I’d like to welcome you to this first episode in a series of four that we’re going to be live streaming to you as part of our creative kids coding bundle.
Before we begin, there’s a few things I’d like to talk about and the first one is the Q&A session that we’ll be having at the end of today’s live stream. You can send us in questions or comments you have throughout the stream to our email address, which we have at [email protected]. And you can see that coming up in your screen right now. You can also find this email address in the sidebar of the streaming page, which you’re using to watch this live stream.
Additionally, you will need to download a piece of software in order to partake in the activities we are having today. You can find the instructions to download the Arduino software through a link in the sidebar on that stream page. That’s right underneath our email details, or you can find these instructions linked in this yellow instruction booklet, which came with the Annoyatron. If you go to page eight, it’s across page eight and nine, where you can find these instructions, and this shows you where you need to go and what you need to do to download the software.
Now, this ties really nicely into the fact that even though this is a live stream, you can pause and come back at any time. So if you need a little bit of time to install that Arduino software, you can just hit pause. I won’t be going anywhere. Also, if you aren’t able to make it to any of the other workshops, we are saving the recording and uploading it to our website, So you’ll be able to access that at any time afterwards. That also means that some people today who are watching will be watching this after the workshop is complete. And for those people, we will still be able to answer your questions and comments you send to our [email protected] email address, but we will be following those up over email, obviously, because we can’t answer those on the live stream right now today.
Well, that is the last of the formal parts. I wanted to get out of the way, and now it’s time to take a look at what we’ll be doing in today’s workshop, because I’m very excited. We are building some different projects today, and the first one is the ticking clock. Now, I grew up with an analog clock in my bedroom, so I know how annoying these are. It’s essentially a ticking sound that goes over and over and over again. And after that, we’re going to be building an alarm and flashing light. You can imagine what this is. It’s an alarm and it’s a flashing light. And this is the one I’m most looking forward to today.
And with each of these two inventions, there are essentially three steps to them. We’re going to be building, we’re going to be coding, and then we are going to be pranking. So essentially we have to put together some parts, a little bit like Lego. We’re going to be plugging things together, putting some wires to different things, and then we’re going to be writing some code. And that does sound a little bit scary maybe, but I’ll go over that in just a moment. And then we’re going to be using this invention to prank. That’s the best part, obviously.
Now, the first step is build. So I think it’s time to take a look at the parts you’ll need to organize for today’s projects. There are two projects, but I’m going to go over all the parts you need so that you can get them out of your Annoyatron kit and then have them on the side ready to go as we are building these. So I’m going to switch to an overhead camera so that you can take a closer look at what we will need for today.
So the first part you’ll need is a brain board. And this is a blue board, a blue little computer chip, and you can find it in the very top of your Anoishin box. You’ll notice that on the top, it will either say, “EduKits Uno R3” or “Brain Board.” Both of those are the same. You will also need the blue USB cable that comes with the Brain Board, and that will be used to connect the Brain Board to your computer. And that’s how we will be uploading the code that we will be using today.
Also, you will need a buzzer, which is this little black cylinder. And it has two legs sticking out the bottom of it. One is longer than the other. And it also has a hole on the top, a little hole where the sound comes out of. So that’s what’s going to be making the noise for the ticking sound and also for our alarm today.
Onto our last few parts here, you will need an LED. We have three different colours of these in the kit, along with a colour changing one, which we’ll use in a later workshop. And you can pick from either red, yellow or green. Doesn’t matter which one you use because they all work the same. You’ll also notice that it has two legs sticking out the bottom and a coloured top there, which tells you what colour the light will be when it turns on.
And lastly, you will need two coloured wires. I’ve picked a black one and a red one, but it really doesn’t matter which colour you pick because they’re all the same. It’s important to note, however, that one end of these wires is a hole and the other end is a pointy end. This is really important because any other type of wire won’t plug in properly when we’re putting things together later.
So those are all the parts you need. So now it’s time to take a quick look at how the ticking clock works so then we can get into putting it together and coding it. So for the ticking clock, Essentially what’s happening is we are making a ticking sound. That’s the first step. We’re then going to wait a second because obviously, you know, when a clock’s ticking, its hand goes forward. That makes a tick. It waits a second and then the second hand goes down for another tick a second later. And then this is essentially just going to repeat forever. great.
So let’s get on to building this and then coding it. And to build it, we’ll need to head to the EduKits website to see the build instructions. On the EduKits website, you’ll notice that we have a top bar, which shows you the different items for our website and under products, under and the amazing anointron, click on inventions. This will take you to a webpage where we have listed all of the different inventions you can build with the amazing Annoyatron. And scrolling through them, you can see that there are quite a lot. But the one we want to pick is the ticking clock, which is the first one here. I click on it and it will take me to the invention page.
Now, if you look at the page, it’s important to say that there is a little description which tells you what the project does. And there’s also a video. I obviously won’t play that video for you, but it has me going through building the project and I just wanted to point that out too in case you’re going onto some different projects and building them after we’ve had this workshop. And here’s the important part, the parts.
Now we’ve already gone over these, but one thing I didn’t mention is that you will need a person to prank and we did not include this in the kit unfortunately due to essentially shipping limitations. We can’t put a person in the box unfortunately with your kit. So you will have to find someone in your own household. So maybe a sibling, a parent, a grandparent, just make sure they’re not doing anything important that you might be interrupting. And you can use that person to test out how good a job you’ve done with the pranks you’ve built in today’s workshop.
So now it’s time to put the different parts together. So we’ll scroll down to the let’s build this section where we can see the different steps we need. And if you take a look, there’s only three of them. So this is going to be pretty simple. There’s add the buzzer, plug in the cable and connect to your computer. So I’m going to swap to the overhead view so we can take a closer look at putting together these parts. First of all, I’m going to get rid of the parts we don’t need for this invention, which are the LED and the two coloured cables. I’ll also take away this blue USB cable because we don’t need it for the moment.
Now, it’s time to take a closer look at this Brain Board and this buzzer. What we’re going to do is we’re going to take the pins of the buzzer and slide them into the pins on the Brain Board. Now, if we look at the Brain Board, and I’m just going to zoom in here on the computer, you can see that we actually have numbers next to them. you can see that every hole here, whoop, sorry. Every hole here on the Brain Board has a number next to it. So you can see here, this one has a zero, this one has a one, this one has a two, this one has a three, this one has a four, five, six, seven, and so on. So essentially, all the holes on the Brain Board, sorry if I called them pins earlier without explaining that those two terms are kind of the same thing when we’re talking about the brain board. Those holes each have a number and we use that number to talk about the hole. So when I’m talking about where we’re putting the buzzer’s legs in, you can see that the positive leg goes into 11 and the shorter leg, which is negative one, goes into ground.
So now it’s time to look at the brain board and do this ourselves. Here we go. So now I’ve zoomed in nice and close to the brain board and we’re going to be lining up to 11 and ground. So if you take a look at the buzzer, it’s important to say that one leg’s longer than the other, like we talked about before. And I’ve clearly got this round the wrong way. The long leg is going into, oh no, I had it the wrong way. I had it right before. The long leg is going here into 11 and the short leg is going into ground. So I’ve lined them up here and then I’m going to essentially push this in like so. So the legs slide nicely into the holes or pins on the Brain Board and that’s essentially assembled.
The last thing we need to do is connect the Brain Board to the computer, which we can do using the blue USB cable, which we put aside before. So all you have to do is connect one end to your computer and the other end to the Brain Board. So I’ve already got one end connected to my computer. So I’m going to take the other end and connect it to the Brain Board. You’ll see that as I connect the cable, it doesn’t want to stay still here. As I connect the cable, there are two lights that appear on the board and that tells me that everything’s working, there’s power and we should be okay to move on to coding it.
Now you might be wondering what is code? And I’m sure you’ve probably got a little bit of an idea, but code is a bit complicated. So it’s going to be good to go over it. So computers and humans obviously don’t speak the same language. And if you’ve ever had tried to have a proper conversation with Siri or Google Assistant or even Bixby, which is also pretty bad, you’ll notice they just don’t get us and we probably don’t get them as much as we’d like to either. Robots don’t really speak English. They work in zeros and ones which is called binary. Whereas we have our own complex language.
In fact, you know what? Humans have multiple, many hundreds. You go to a different country and they may very well have their own language. So we came up with code, which is essentially a kind of language that both humans and robots or computers can understand. And the reason for that is it’s kind of in between. It’s not something that is fully human or fully computer. So it’s kind of in the middle. That’s why it seems a little bit strange to us, but it is, it’s kind of like learning another language slightly in that you do it more and more and you just get better at it.
But luckily we won’t be writing any of our code, our own code today. Rather we’re going to be copying some code and then making little tweaks to make it even better or more annoying. So let’s head back to the computer and take a look at the EduKits website again. I’m going to scroll down to the Code Some Chaos section because chaos is really what we’re interested in here. And I am going to select the code in this box. Oop, I’m going to select the code in this box by highlighting it all with my mouse cursor, right clicking and selecting copy copy, which will copy it to my clipboard. Alternatively, you can just click the copy button in the top right corner of the box and you’ll see a copied message to tell you it’s successfully copied to your clipboard.
Now it’s time to switch to the Arduino application, which you should have installed by this point. When you open the Arduino application, it should open a new file and it already has some code in it. And code is this funny text here that you can see. I’m going to select all of it now and hit backspace, then right click and paste in the code from the clipboard. And this will replace the code that was already there with the code from EduKits, which is some sample code for the ticking clock.
Now there’s only two steps left before you can try out your new invention. The first one is to select the port. And you do this by going under the tools menu, selecting port and selecting Arduino Uno, the option up here. And you’ll need to do this every time you connect the board to your computer for that day. If you’re on Windows, this tools menu won’t be at the top of your screen instead, it’ll be up here just above this green bar where my cursor kind of is hovering now.
And now you can upload this to your board. So this is essentially sending the computer code to the Brain Board and it’s going to carry out the instructions. So I’m going to click this upload button and it will send to the board.
You can see that it says save sketch folder as, and this is just a way for us to save our work so in case the computer has a crash or something, we don’t lose anything. I’m going to type in ticking clock. Good, I can spell today. That’s good, good to know. I’m going to click save and this little progress bar will tell me how it’s going.
We’re almost there and it’s uploading and it’s uploaded. There’s a little bit of noise coming out of this, a light tick. In fact, I’m going to hold it up to the microphone a little bit so you can hopefully hear it. And you might be thinking to yourself, Well, that’s not very annoying, is it? And luckily I’ve got you back here. We’re going to be looking at the code, taking a quick look and trying to make this invention just a little bit more annoying.
So if you remember with the ticking clock, what’s happening is we’re making a tick sound and then we’re waiting a second and then repeating that over and over and over again. But there’s a little bit more to it. And we’ll see this in the code. So what’s really happening to make this tick sound is we’re turning the buzzer on, we are then waiting a single millisecond, which is a tiny, tiny amount of time, a millisecond is a thousandth of a second, and then we’re turning the buzzer off. So this turning on and turning off, which happens really quickly, is what makes the tick sound.
And to make it more annoying, what we’re going to do is change this tiny delay, this tiny one millisecond break between turning on and turning off to make it a little bit longer so the buzzer stays on for longer and has more time to be annoying.
So let’s swap back to our computer and take a look at the code. I’m going to minimise the web browser so we can focus more on this code here. And if we look here, there’s kind of two separate sections. There’s one that says setup and there’s one that says loop. And if you look in the setup section, you can see that it says pin mode 11, output. And if you remember, 11 was the number of the pin or the hole we connected the buzzer’s long leg to. So 11 just means buzzer. So we’re setting the buzzer to be an output, which makes sense because it’s outputting sound.
Now, if we go up into the loop, remember we talked about how the code repeats over and over again, so that’s what’s happening in the loop. you can see that we have digital right 11 high. So 11 is the buzzer and high is just a fancy way of saying we’re turning the buzzer on. So we’ve turned the buzzer on, this is our little delay. So this is what we’re going to change in a moment and digital right, so that’s turning the buzzer off again. So let’s change this delay from one to 10.
Great, I’m going to hit the upload button and we should hear a more annoying sound. (chirping) Okay, so this is sounding less like a tick and more like a chirp, which is good news. Hold this up to the microphone again so that you can hear it better. Now, this is kind of annoying, but I can assure you that we’re going to get even more annoying in just a moment later on in the workshop.
I would like to go over with you right now how we can stop this invention though, because one important thing to know with the Annoyatron is things can get a little bit loud and a little bit hectic when you start modifying the code. So the first step when things get a bit hectic is to disconnect the board from power. And you can do this by just simply pulling the cable out and you’ll see that we have no lights on the board and we have more importantly, no sound is coming out of it.
The, however, the problem with this is the brain board Well, remember whatever code you sent to it and just run it again the next time you put power into it. This can be a problem when you’re trying to code your next invention, or you just want to have a little bit more of a play around with your current invention, because to upload the code, you’ll have to plug it back into the computer and then the annoying sound or the annoying prank will just come back again. So the solution to this is clearing the code, which I’ll show you how to do right now.
So on your computer, you will need to click this button that says new, and you’ll need to create a new sketch. You can click on this and you’ll see that a new blank piece of code, like the one we started off with, appears. And it has some code here, void setup and void loop. The same is here, but there’s nothing in the setup, and there’s nothing in the loop, so nothing’s going to happen. I’m going to click the upload button and the code will be sent to the board. Oops, we’ve got an error here. This sometimes happens. If it’s orange down the bottom, it means there’s an error. And the reason there’s an error is because I forgot to plug the board back up. That’s why it’s so quiet. Goodness me. So I’m going to plug the board back into power. The noise should start again. And now I can click the upload button. There we go. Now that you can hear that there’s no noise and we’ve successfully cleared the code.
Also, another thing to keep in mind when you are making these pranks, if it is a little bit annoying but you don’t want to clear the code, your buzzer should have a little sticker over the top which quietens the noise, or you can just stick a piece of sticky tape over the top to make it a little bit quieter. That’s probably more for the parents listening in than the kids.
Now it’s time to add a light to this. We’ve kind of gone and half created an alarm and we’re pretty much moving into the alarm and flashing light now. To really seal the deal, I’m going to change this delay to 100. Now this is going to be pretty annoying, so I’m going to upload it, just show you what it sounds like and then clear it because I cannot have that going in the background for the rest of the workshop. you won’t be able to understand what I’m saying. Here we go. Yes. As you can tell, I’m not going to be able to leave this on because it’s going to be too distracting. So I will disconnect it. But now that’s a proper alarm. And in fact, if you change that delay to 500, you would have an even better alarm.
So now we’re going to properly move on to the alarm and flashing light. So already we’ve looked at assembling some different parts so the brain board and the buzzer, we’ve copied and pasted some sample code into the Arduino software and sent it to the brain board. And we’ve had a pretty annoying prank in my opinion. And now it’s time to move on to our second and last prank for today, which is pretty much the same without modified code. So we don’t have a tick anymore. we have an alarm and now we just have to add a light to make it an alarm and flashing light. To do this, we’ll need the extra parts we put aside before. So we already have this Brain Board with the buzzer.
I’m going to now get the LED. There we go, we have the LED and the two wires here, the red one and the black one, or really whatever colors you chose yourself. Now the assembly here is pretty simple and we don’t have the instructions for it up at the moment, but I’m going to show you how to do it right now. Okay, so if you look at the LED, you’ll notice that like the buzzer, one leg… So if you take a look at the LED, you’ll notice that like the buzzer, one leg is longer than the other. And like before, the long leg is positive and the short leg is negative. We have two different colours of wires. I have a black one and a red one. Red’s generally positive in the world of electronics and black’s generally negative. So I’m just going to use those colours here. And remember, we have one end of our wires, it’s a hole and the other end that’s pointy. Can I get it in the shot? There we go, that’s the pointy end. I want the whole end. So I’m going to get the red wire, that’s the red one, and I’m going to slide its end onto the longer leg, so that’s positive. And then I’m going to take the black wire and slide it, its whole end onto the shorter leg. There we go.
So we now have the LED properly connected. And now it’s time to connect the other end of these cables to the Brain Board. So I’m going to move it back into view. There we go. Now we are going to connect the, we’re going to connect the red, the red cable to pin nine and the black cable to ground or GND. So I’ll just remove myself from the frame there so you can see that better. The red one here is going to go into nine, which is this one. And then we are going to have to go over to ground on the other side because we’ve run out of, it’s there, obviously we plugged the buzzer into the one on that side, and I’ll just slide it in there. There you go.
Now we have our flashing light attached to the alarm circuit we built before, and now it’s time to connect it back to the computer and write some code. But if you haven’t cleared the code from before, probably just wait a moment for that. So with the flashing light, it’s pretty much the same as the alarm, but a little bit different. So if you look here, you can see that we have pin mode 11 output, and oops, and before we were saying that the 11 really just means the buzzer and we’re setting the buzzer as an output. So this time we want the pin mode to be like, to be pin mode nine and then output.
Now, an important thing to note here is that it’s really important that you pay attention to the capital letters and the commas and the spaces here because code can be tricky. And if you don’t write the right things in the right places, It’s not going to work. So in this pin mode section, you’ll notice that I have a lowercase P and then a capital N here that kind of separates the two. Then I have an opening bracket here with no spaces, the nine and a comma straight afterwards, then a space, and you’ll see that output is in all caps. Then I have a closing bracket and a semicolon. And you have to have a semicolon at the end of every line of code you write to tell the computer that’s the end of it.
Now, coding is a little bit like making a cake in that, well, if you look at the recipe over here, we have different steps and they happen in a specific order and there’s certain rules to making a cake and that’s what this recipe is. However, oh, and if you follow this recipe, it’s going to make a very nice cake. However, if we go and shuffle up this recipe, if we do the things in the wrong order, it’s going to probably turn out a bit wrong. And in fact, we’re going to have a mess, not a cake. Yeah, that doesn’t look like a very nice cake.
Okay, so back to the code. This means you just have to pay attention to little details like that. And if you type in pin mode right, then you’ll see that it turns orange. And that’s a good sign. The last little bit we need to do is type in digital write, oh sorry, we’ll type in analog write here. That’s a little bit different. A lowercase a and a capital W. And we’ll type in the pin, which is nine, and this pin nine means our light. And then I’m going to type in 100. So this is the brightness of our LED. Then after the delay, which is 100, I’m going to type in analog write again. Now don’t forget to do those capitals and lowercase letters in the right spots. And this time I’m going to set the brightness to zero. Don’t forget the semi-colon here and here at the end of the lines. So what’s essentially happening here is we already have some code that turns the buzzer on and off again and then waits a second, making an annoying sound.
And now we’re adding a light to turn on and off with it. So at the same time, the buzzer turns on, the light turns on, and at the same time, the buzzer turns off, the light turns off too. Now all that’s left to do is reconnect the Brain Board to the computer and upload the code. So I’m going to do that now. I’ve got the Brain Board, I’m reconnecting it to the computer. I’ll hear that annoying sound again. (beeping) Great, we know it’s still working.
Now I’m going to click the upload button and it’s now uploading to the board, which I can see with the progress bar. And I swap to this camera here. I disconnected the, I disconnected the LED accidentally. You can see that our light is now flashing with the alarm. This is really annoying, so I’m going to disconnect it. Actually, you know what? Let’s make it even more annoying. We’re getting pretty close to the end of the workshop. So I’m going to change this delay from 100 to 500. My ears are about to be blown off, so. Yeah, that’s super annoying. Okay, I’m pulling the plug. Bye bye. Bye bye alarm and flashing light.
So in this workshop, we’ve built two great inventions. We’ve built the alarm and flashing light and also the ticking clock before that. It’s been great having you on. And now we’re going to be looking at a few of the questions that have come through for the Q&A through our email address, [email protected]. And like I mentioned at the beginning of the video, if you are watching this video, even after it’s live, or if you’ve paused for a little bit and you’re watching in delay, we will be able to answer your questions sent to this email address, even if we can’t get to them in this video.
So let’s jump to the first question. And the first question for today is, can I use my iPhone or iPad to code the Annoyatron? And that’s a really great question. And the answer to that is unfortunately no. If you take a look at the blue USB cable that we’ve been using to connect the Brain Board to the computer, you’ll notice that the end that plugs into the computer isn’t going to fit into your phone, so I have a phone here. It’s not going to fit, and it also won’t fit into your iPad or tablet. So you will need to use a computer just because of the way it connects. And also the Arduino software won’t run on those devices either.
The next question is, help, the port option is grayed out in the tools menu and I can’t select it. My code isn’t uploading. That’s also a great question. The port selection is important because your code won’t upload properly without it as this person’s found out. I’m going to reconnect the board to the computer, but this time I’m going to disconnect the buzzer and the LED just so it doesn’t make noise. And I’m going to replicate this issue here.
So if I go into tools menu, port’s not grayed out because I have a Bluetooth port here, but you’ll see that there’s no option to select Arduino Uno like we had before. And this is because it’s not connected properly to the computer. Now if you reconnect it to the computer, so if I just plug the cable back in, you will find that the board reappears under the port section. So I’m selecting tools, port, and you can see that Arduino Uno is now an option.
However, you might have the board properly connected to your computer and it might still not show up. And that’s probably because even though it’s plugged into the board, it might not be fully plugged in. And you can check this by looking to see if there are any lights on the board. If there aren’t, all you need to do is push the cable a little bit further into the brain board and that should fix it up. Otherwise, just try a different USB port on your computer.
And we’ll be doing one more question on the Q&A before we respond to the rest of these over our emails. And the last question is, the message says uploaded, but there is no noise. I don’t hear any ticking sound. So this person has done all the steps, they’ve connected their buzzer, their port’s working, and the code is uploaded, but they can’t get any sound out of their buzzer. And the reason for that is probably not connecting the buzzer to the right pins. And that’s something even I do quite often.
So the trick to this is finding the right holes on the brain board and remembering that there is a longer and shorter leg on the buzzer and connecting those correctly. In fact, I’ll do this step again right now so that you can take a closer look at what you need to do here. So swapping back to the overhead shot, I’m going to zoom in a little bit again so that you can see. Okay, so we have the holes on the brain board and I’ll also grab the buzzer out. Remember, the holes we’re interested in are nine, oh sorry, 11 here and ground, which is up here. We want to put the shorter leg here into ground and the longer leg into 11.
So what I’ll need to do is line them up. So I have the long leg here and the short leg. I’ve lined them up like so. And now all that’s left is to tilt them in to those slots. There we go. Oop, the 11 one, sorry, the ground one hasn’t gone in. Oop, it is a bit tricky there, but I’ve done it and that’s how you put it together. Now, a common thing is actually putting the short leg where the long leg is meant to go and if that’s your problem, you can just fix it by picking up the buzzer, flipping around 180 degrees and just popping it back in and that should solve your problems.
So thank you all so much for coming and doing this live stream workshop with me. It’s been a pleasure to have you and I’m looking forward to doing another workshop with you tomorrow. And then again next week on Monday and Tuesday. Until then, see you later and have a good day.
[ Silence ]