Lesson video

In progress...

Loading...

Hi, everybody.

My name's Mr. Brown.

Welcome to this lesson on microcontrollers, where we will be looking at what a microcontroller is, all the different parts of a microcontroller, and thinking about how we can use those in our design and technology lessons.

Okay, without further ado, we'll start talking about the lesson outcome and the learning outline.

Okay, so the learning outcome today is to interact with Tinkercad circuits workspace to create some simple programmes.

There's a lot of particularly unfamiliar words there that we will go through as we go through the slide deck.

Quite a few keywords to go through today.

We've got five.

The first one is LED.

Now, you might have heard of LED before, but let's go through what it actually means.

So LED, an LED is a light-emitting diode.

The next keyword is Tinkercad.

Now, Tinkercad is an online computer-aided design application, and we're going to be using that quite a lot today.

And if you remember, that was in the lesson outline about Tinkercad.

Another area was workspace, another keyword, workspace.

And that's an area where objects are created and changed.

That's within Tinkercad.

Another aspect within Tinkercad is code editor.

Now, a code editor is an area where coding blocks are created and changed.

And lastly, coding blocks.

We've spoken about coding blocks.

That is a language used to write instructions to a computer.

All will become clear as we go through the slide deck.

Lesson outline.

So we're going to have two learning cycles today, the first one being navigating the circuit workspace and the second one being using the code editor.

These are two separate parts of Tinkercad, and we're going to explain how to get into Tinkercad as well.

Let's start with lesson cycle one then.

So the first thing you might be asking a question is, what is a microcontroller? Well, micro:bits are microcontrollers and they've got buttons and they've got LED lights.

And you can see there you've got buttons, a touch button, you've got push buttons A and B, and there's 25 LED lights in a five by five configuration.

Now, micro:bit buttons and LED lights, they can be programmed with different software packages, and you might have used some of them in other lessons.

But today we are going to be using Tinkercad.

Now, Tinkercad is an online computer-aided design application.

It's got lots of different things that we can do and lots of different things that we can use.

They can be used for computer-aided design with 3D blocks.

It can be used for coding.

It can be used for circuits.

There's so many different applications to it.

We are just going to be looking today at the circuit side of things.

So how to log in? Well, we've given lots of different instructions and separate instructions for your teachers to actually help you on how to set up a class, because you get to have your own class, get to have your own account which you can log into.

By logging into Tinkercad, we can then explore all the different components of it further.

So the first thing is to click on Log into Tinkercad and then you need to click on Students with Class Code.

Then you type in the class code.

Your teacher will be able to give you the class code.

And then you join with a nickname and you enter a nickname.

So what is Tinkercad? This is a check for understanding.

Is it A, an online computer-aided design application; B, a type of computer used for drawing; or C, a tool for writing stories? Which do you think? That's correct.

Well done.

It's an online computer-aided design application.

Okay, so hopefully now you've been able to access Tinkercad and have logged in, and you've probably got a username and you've joined a class.

So your teacher will be able to control everything that you can see and you can do, and you should have something that looks a bit like this.

This is like the homepage of Tinkercad.

The bit that we are going to be looking at today is circuits.

So what you need to do is to create new circuit, and it's that green box that's pointed on the screen there.

We're not going to be looking at 3D designs today and we aren't going to be looking at code blocks, but we are going to be using coding blocks, but we are going to use those within circuits.

This then is the Tinkercad workspace, and all the components are on the right hand side, all the different things that you can put into a Tinkercad circuit.

And we use the workspace to design everything and put things on there.

So the workspace is just that big white space that's there.

The components are there.

Right, check for understanding.

So to use a micro:bit in Tinkercad, we need to create a new, is it A, 3D design; B, circuit; C, code block? All of these are parts of Tinkercad, but which one are we going to use a micro:bit in? Which do you think? That's right, we're going to be using circuits.

Okay, so we are going to be adding a micro:bit to the workspace now, and you can see here that this has been done already and it's very, very simple.

All you need to do is to click on the micro:bit component and then drag it onto the workspace.

You can add other things as well, but today we are just going to be looking at adding the micro:bit.

You can also notice that when you drag that over, a lead will appear at the top, and we'll be talking about all those different aspects.

But that's the lead that actually connects into the computer, another time.

We are then going to be using the code editor.

So the code editor, if you have a look at the top right hand corner, you need to click on select code, and then this coding block area will appear, and we call that the code editor.

That then gives you types of blocks that you can use.

There is basic output/input control.

We are only going to be looking at basic for the moment.

So there you can see we've got the workspace on the left, we've got the types of blocks in the middle, and the code editor is on the right hand side.

That's where we do all the tinkering and moving about with the different codes.

And of course, we've got the coding blocks that are part of the code editor.

Right, here is your first task.

So your first task today is to label parts of the Tinkercad workspace.

We've talked about them, but what are they? So we've got three on the left and three on the right.

There is a worksheet if you wish to use it, or of course you could just write down the answers yourselves.

But what we want you to do is to label the different parts of the Tinkercad workspace.

What are they? And try to label them as accurately as you can, think about all the different keywords that we've spoken about, because some of them are in this picture.

Okay, I'm going to let you get on with it there.

So off you go, good luck.

Hope it all goes well and hope you can remember all the different parts of the Tinkercad workspace that we've spoke about.

Okay, off you go.

Right, hope you did well.

I'm sure you remembered all the different parts that you needed to.

Let's go through all the different answers.

So the first one, this is the file name.

So the file name here is powerful Leo Inari, but we can change that and I'll show you how to change that another time.

But that is the file name for this particular project.

This is the micro:bit component.

This is the workspace.

Remember, that was one of our keywords.

This is the block type.

This is the code editor, another one of our keywords.

And these are the coding blocks.

Another keyword there.

So we've got all of the keywords all on this one page.

So do think about all of the different aspects that you need to remember.

Right, well done.

So we've labelled all the different parts of the Tinkercad workspace, but now we're going to be labelling parts of the micro:bit that we've just started to introduce.

So can you remember right at the beginning the different parts of the micro:bit? So there are four things to label here.

I'd like you to try to do it as accurately as you possibly can.

I'm going to let you get on with it.

Off you go.

Okay, well done.

Welcome back.

Let's go through all the different parts of the micro:bit that we introduced earlier.

So we've got push button A on the left.

We've got the touch button.

The 25 LED lights.

And we've got push button B.

I'm sure you managed to get that.

There was a few clues there on the actual labelling of the micro:bit, but I'm sure you've got to grips with what those areas of the micro:bit are.

So well done, well done.

So we've looked at all the different parts of the workspace and we've looked at the different parts of a micro:bit.

Let's go on to lesson cycle two.

Now we're going to be starting to think about how we start coding the micro:bit, how we start using it and integrating with it.

And that will be using the code editor.

So we're going to code the micro:bit using the code editor.

This is a fabulous tool that we can use Tinkercad, create different coding blocks and then we can download them onto the micro:bit.

Now we are not going to be downloading them onto a real micro:bit today, but what we're going to be doing is thinking about all the different types of coding and how we can actually change the micro:bit and control it in different ways.

Going back to the different parts, we're going to be thinking about how to use push button A, push button B, and the LED lights.

So those are the things that we are actually going to be using today.

The micro:bit has got lots of other things that we might talk about another time, but for today we're just going to be thinking about these three components.

Right, what we're going to do now is we are going to be looking at controlling a micro:bit and using the LED lights and one of the buttons.

So one of the things we're going to be doing is making a smiley face appear on the LED lights when button A is pushed.

And remembering, going back to the keywords, LED stands for light-emitting diode, and there's 25 of them on the front of the micro:bit and they light up in a red colour.

Let's go through check for understanding so we know what LED stands for.

So what does LED stand for? Is it A, light-emitting device; B, light-emitting diode; or C, light-emitting display? Which do you think? That's correct, well done.

It's the middle one, it's light-emitting diode.

Well done.

Right, so what we're going to do now is we are going to use some of the coding blocks for button A and the LED display in Tinkercad, and we'll go through this step by step.

So step one is to drag on button, and you can see it's that orange coding block that would be if you click on input, you'll be able to see that that comes up.

And you can just drag that over onto the code editor.

Once you've dragged that onto code editor, you need to make sure that A and pressed are selected.

That should automatically be like that anyway, but just double check.

Step two.

So step two, we are now going to be putting in a smiley face, and what we can use is we can use a coding block called show icon.

And if you go to basic blocks, then you'll be able to see a small coding block that says show icon and you'll be able to see a smiley face there.

There are different faces that you can choose.

We're just going to do a smiley face for today.

So select show icon from basic blocks and ensure smiley face is chosen and drag it over into that orange block that we used earlier.

Okay, so we are now going to be starting the simulation in Tinkercad.

And this is step three.

So we've got the same sort of coding blocks there, but this time what we're going to do is we're going to click start simulation, and that's next to that blue box which said code, which we've used already.

But if you click on start simulation, then what you'll notice is that that lead that we had at the top of the micro:bit, that will now go into the micro:bit so that the code is being downloaded.

And there you go, you can see on step four that that's now being connected.

We'll also have a display at the bottom underneath the micro:bit, and that just shows all the sensors working for it, which we don't need to worry about right now.

But now you can see that before on step three, if you have a look at the picture on step three, there was nothing on the LED lights, whereas now there is something on the LED lights and that's the smiley face that we spoke about, because we'll click button A and then the smiley face will be simulated on the micro:bit.

On to step five now.

So we're going to do something slightly different.

We are actually going to use a sad face this time, but we're going to use that for a different button.

So we're going to repeat steps one and two, but this time we're going to select B.

Where it says on button A pressed, we are going to use on button B and pressed.

We're going to keep pressed as the same.

So we've got another coding block that's being dragged over and we're going to use show icon again being pulled over.

But this time it's going to be a sad face.

Step six will then start the simulation again, and you can probably see in the top right hand corner that start simulation has now gone a green button and we are looking for stopping that simulation when you're finished.

But what we're going to do, we're not finished, so we're going to test the code by starting the simulation and pressing each button.

So when you press button B, this is within Tinkercad so it's not the actual real micro:bit yet, but on Tinkercad press button B and a sad face should appear.

Press button A and a happy face should appear.

Right, we can also choose our own LED light designs.

So instead of using show icon, we can actually use show LEDs.

So you can see where the arrow is pointing that within basic we've got something called show LEDs, and you can see there are 25 blocks there.

And what you can do is you can actually do your own design, and this design just happens to be sort of like an arrow really.

And so when button A is pressed, then an arrow will appear that points to the bottom right hand corner.

And that's exactly what Laura wants to do.

Laura wants to make an arrow for buttons A and B, and she probably wants to make them different, I would imagine, rather than being the same.

Check for understanding.

Which coding block allows you to create your own designs to light up on the micro:bit LED lights? Is it A, show icon; B, show LEDs; or C, show number? Which one of these do you think will help you make your own designs for the LED lights? Okay, have a think and make a choice now.

That's right.

Well done, everybody.

It's show LEDs.

Right, time for you to now to do some of the work and working within the Tinkercad workspace and the code editor.

So what we'd like you to do first of all, there's going to be two parts to this, is the first part is to code a micro:bit LED display in the code editor.

So when button A is pressed, a smiley face will appear on the LEDs, and the button B, when that is pressed, a sad face will appear on the LEDs.

So that is the first task for you to do within the Tinkercad workspace.

We're not connecting the micro:bits right now, but we're just tinkering with it.

We're working with the simulations within Tinkercad.

Now what you will notice is that the picture below will actually help you because it shows you the coding blocks that you need.

And remember, you need to start the simulation and stop the simulation.

So that is the first part of today's task B.

So get that one done first and we'll come back very shortly and talk to you about task B two.

So I'll give you some time now to get task B one done.

Off you go.

Right, well done.

Hope you've managed to do that okay.

Nice, simple coding exercise where we're just using just a few coding blocks.

It can get much more complicated than this, but this is just really good to get us started and to get us confident in using the micro:bits and using Tinkercad.

So the second part is going to be a little bit more complicated, and that is that we are going to be using your own LED designs using show LEDs.

So if you remember back in the explanation we talked about using show icons, but this time what we'd like you to do is to replace show icons with show LEDs and make up your own designs, make up a different design for button A and button B.

Okay, off you go.

I'm sure you'll do really good job with this.

Sure you'll understand exactly what to do, and I look forward to seeing what happens when you're finished.

Okay, off you go.

Right, well done.

Hope you managed to get on okay with that.

I'm sure you did a fabulous job.

Let's go through an example through the feedback.

So Laura was able to have different faces appear when she pressed buttons A or B.

You can see there we've got the show icons.

Secondly, she was able to code the LED lights as arrows.

And you can see there that button A, when that was pressed, the arrow would point down to the right hand side to the bottom right hand corner.

And when button B was pressed, then it would point to the top left of the LED screens.

So that is what she was able to do.

Now I'm sure you came up with lots of different ideas and different designs for the LEDs.

There's so many different ideas that you could have done, and I hope you've had a lot of fun doing that and I'm sure you've been incredibly successful.

Let's go through the summary of today's lesson on microcontrollers.

Micro:bits are microcontrollers which can be programmed.

Tinkercad circuits can be used to create programmes for micro:bits.

Tinkercad circuits can be used to simulate programmes for micro:bits.

And coding blocks can be used to create and simulate programmes.

That's great.

Thank you very much for being with me today.

I look forward to working with you in the future and hope you've learned a lot and enjoyed yourselves.

Well done.