Lesson video

In progress...

Loading...

Hi, welcome to today's lesson.

My name is Mr. Brown, and we're going to be looking at inputs and outputs of Micro:bits today.

So I'm looking forward to working with you and hope you're ready to learn.

Okay, let's go through the Learning Outcome and the Learning Cycle for today.

So today's Learning Outcome is to be able to identify and use inputs and outputs on a Micro:bit.

And we'll be going through all the different inputs and outputs that a Micro:bit can have.

You may already know some, but we're gonna go through quite a few different ones today.

Here are our Keywords.

So again, we've got five Keywords today.

Input, and that's something that goes into a system, Output, something that comes out of a system.

Programme, a programme is a sequence of instructions that can be used to control electrical components.

Coding blocks, and that's language used to write instructions to a computer.

And components, and components are different parts of a product.

Here is the Lesson Outline for today.

So we're going to be looking at two learning cycles, one looking at inputs and one looking at outputs of a Micro:bit.

And we'll start with Micro:bit inputs.

So Micro:bits are systems, that and they've got inputs and they've got outputs, and these are all the different components that are in a Micro:bit.

So input components, that's, those are things that send information or data into a system.

So a keyboard would send in information into a computer, for example.

A button will send an input into an electrical device such as a washing machine to turn it on.

A microphone would record sound and put it into something.

So an input is something that puts information or data into a system.

Now these input components, they can control what happens to the outputs.

So if a push button creates a display on the LEDs, then we can push button A and a smiley face appears.

We might push button B and a sad face appears.

And those are buttons A and buttons B.

Check for understanding, what is an input? Is it something that goes into a system, something that is in the system, or something that comes out of a system? Is it A, B or C? That's right, it's something that goes into a system.

Well done.

Okay, so here are the Micro:bit inputs on the front.

Now this is a version two Micro:bit.

So what are the inputs on the front of a Micro:bit? They are a light sensor, so that's 25 LED lights.

Let's push button A.

There is the touch button, there is a microphone and there's push button B.

But also, there are other inputs that you could attach.

So you could attach a moisture sensor, you could attach switches.

There's so many electrical components that you could actually add to the Micro:bit using those pins that are along the bottom.

Now, on the back of a Micro:bit are the following inputs.

There is a temperature sensor, there is a compass, an accelerometer, there's a microphone.

Right, check for understanding now.

Which of these is not an input component in a Micro:bit? So which is not an input component? Is it A, a compass, is it B, a speaker, or is it C, a microphone? Which do you think is not an input component of a Micro:bit? That's right, well done everybody, it's a speaker.

A speaker is not an input component of a Micro:bit.

Now inputs can be seen as coding blocks in Tinkercad Circuits.

So when we open up Tinkercad and we go into Tinkercad Circuits and we put in a Micro:bit and we click on code, then we can get all of these different coding blocks.

Now, we've got to be very careful here that the inputs that we're going to use, we need to use very carefully.

And if we use Micro:bit as a data logger, as Jacob says there, there are lots of inputs actually we won't need.

So we won't need all of these things.

Will we need temperature? Probably not.

Will we need light level? We may do, but we probably less likely to.

So don't be feeling that you need to use all of the inputs of a Micro:bit.

We need to think very carefully which ones are going to be best for us to use.

So when we're choosing the inputs, we need to think about the different types of traffic that you might want to log.

You need to think about which inputs you would use for each traffic.

So for example, a car comes across, what are you going to do? Which button are you gonna press or how are you going to use the Micro:bit inputs? So Jacob is thinking that, when a car goes past, he's gonna press button A to log that a car has gone past.

And that's on the left hand side there of the Micro:bit.

However, when a bus goes past, he might actually tilt the Micro:bit to the left and the accelerometer actually uses, is used in the Micro:bit to actually log that.

So when you actually tilt it to the left, then the accelerometer notices you've tilted it and therefore will log a bus going past.

Here is task A.

There's going to be two different parts to Task A.

Okay, so this is the first part.

So label the input components on the front of a Micro:bit.

Now you might already have remembered some of these from looking at these before.

However, there are some new ones here that we might want to consider what they are for and how they can be used.

There are six different components, they're input components that we'd like you to label.

All right, off you go.

Here are, here's the feedback, let's go through them.

So the light sensors, that's the LED, that's an input component.

So what happens is, is that when the light, when those light sensor LEDs are covered, that's actually a light sensor and it sends an an information through the Micro:bit to say it's actually gone quite dark.

Push button A and attaching inputs to the pins could be along the bottom.

We've got push button B, the microphone, and the touch button.

Good, well done, I'm sure you've done really well with that task.

Let's go on to the second part.

And the second part, and you've probably predicted this already, is to label the input components on the back of the Micro:bit.

And there are three here for you to actually label.

Okay, I'll leave you to it, off you go, Right, well done, let's go through the answers.

So we have a temperature sensor on the left, a compass and accelerometer.

If you just did one, that's absolutely fine, it's not a problem.

And microphone is the final one as well, that's being labelled as an input component on the back of a Micro:bit.

Okay, good, so you've learned about all the different input components of a Micro:bit on the front and on the back, well done.

We go on to the third part of the task now.

So now we know that you've, know what all the different inputs are, we've now got to start thinking about which ones are we actually going to use.

So the first thing is what type of traffic do you think you'll need to log? So an obvious one would be cars, maybe bicycles, maybe buses, maybe lorries.

There might not be other things, but which ones do you think are gonna be more common and will actually need to be logged more? Because you want to think about the user of the data logger and which is gonna be easiest to actually use and which is gonna be hardest.

And remember we can use all different sorts of types of the inputs for these, but you need to have one type of traffic with one type of input.

So think about the traffic that you're gonna need and then think about the input, which is going to be best for that type of traffic.

And it's best to try to have a list written of the traffic and then the input.

Okay, off you go.

Okay, so Jacob chose some Micro:bit inputs for his traffic data logger.

So he's decided that when button A is pressed, he's going to log that it's a bicycle.

And when he is pressing button B, it's going to log lorries.

When he does, when he pushes buttons A and B at the same time, it's going to log buses, and he's going to tilt the Micro:bit to the right to actually log that a car's there.

And that is the decision that he's made for how he is going to use inputs to log his traffic.

You might have actually just thought about other types of traffic or other ways of using the inputs.

That's entirely up to you.

It's not a problem.

We want you to be creative, we want you to use the inputs, the ways, the way that you want to use them.

This is just one example of a solution.

Okay, good, I'm sure you've come up with some brilliant ideas and had a complete list of all the different types of traffic that you're going to try to log, and how you're going to log them using a Micro:bit.

Well done, you've come a long way.

Let's go onto our Learning Cycle Two now.

And we're going to be looking at the outputs, the Micro:bit outputs.

Now as we've said earlier, they're system, Micro:bits are systems that have got inputs and outputs and they've got different components.

Now, output components, they allow the system to interact or communicate with us or the environment.

So it could be through sounds, it could be through light, it could be through movement.

There's three examples there.

So you've got a speaker, you've got lights, and you've got a motor.

Those are just some examples of the output components that could be within a Micro:bit.

Let's do a check for understanding first.

What is an output? Is it A, something that goes into a system? Is it B, something that is in the system? Or is it C, something that comes out of the system? Off you go.

Think about which one you think is an output.

That's right, well done, it's something that comes out of the system.

Clue's sort of in the name really.

Okay, so let's look at the output components of a Micro:bit.

And will be similar to Learning Cycle One and then we'll look at the front first.

So on the front there are 25 LEDs, that's Light Emitting Diodes.

And there's 25 of them in a grid of five by five.

Now whilst the LEDs can light up, you can also attach outputs like headphones or LED lights or motors.

You can add them to the pins along the bottom.

And that's really important to consider when we're thinking about what sort of output components we can use.

So you could have sound coming through the headphones, you could have other LED lights that would actually light up and you could use different coloured LED lights, or you could use a motor that might actually spin and you'd be able to control that using the Micro:bit.

Let's have a look at the Micro:bit output components on the back.

We've got a radio antenna.

Now that can actually send and receive signals to other Micro:bits and that could be really useful when you want to do various different coding activities.

We're not necessarily going to use those today, but it's worth knowing that, that radio antenna can be a really useful device.

We've got a speaker.

Now the speaker can be used to actually have sounds and to have all sorts of different things coming through it, but of course as we've mentioned earlier, you could also attach a pair of headphones to the pins to also have an output of sound coming through those.

Must be noted also, that this is with the Micro:bit Version Two, which does have the speaker.

Older versions of Micro:bits won't have the speaker.

Check for understanding now.

Which of these is an output component in a Micro:bit? Is it A, a push button, B, an LED display, or C, a touch button? Which of these is an output component in a Micro:bit, push button, LED display or touch button? Okay, off you go.

That's correct, it is an LED display.

The LED display is an output component.

The push button and the touch button, they are both types of inputs.

Now Micro:bit outputs can be used as coding blocks in Tinkercad.

And actually if you think about the different sections of the different blocks that are available, you've got Basic, Output, Input, Control, Math and Variables.

If you look, if you click on Output, you'll be able to see there that you've got basic outputs, and they seem, they're all in the same sort of colour, they're in a blue colour.

Now Jacob, just as he did with the inputs, he needs to choose the outputs carefully.

So they've actually got a purpose.

There's no point in just doing it for the sake of it, but we're actually going to have a purposeful use of the outputs.

Now one thing that we can actually use and we've not thought about these before, a coding block, that can change the LED display is show string.

Now show string, at the moment, this one says, show string, Hello! But what does that actually mean? Well, what it means is it means that you can programme words to come up on the output display when an input is used.

So if you used shows string, Hello, then when you clicked on it and did the simulation, then you will see the word hello, with the exclamation mark appear as a scrolling part of the LED display on the Micro:bit.

Now the good thing is, the great thing is, is that you can change that word hello to any word that you actually want.

And there we've, Jacob has had a go at this, and on button A press.

So when he presses button A, then it will show string Car.

So A will show car, so then the words car will appear.

And if you look very carefully on that picture, you will see the letter C that has arrived, that has come up and then A and then R will follow it after a time.

Now before going any further, so we've thought about inputs, which inputs we're gonna use, we've thought about outputs, and how to use words come up on our screen.

But I think it's a good idea now, to try to give our project a name that we recognise, so that we know when we're coming back to it, what that project was and when we used it.

Now to rename your project, you just need to click on the top left hand corner of the workspace.

And you'll see there, it's given a random name for each product, for each project, sorry.

And all you need to do is click on it and you'll see that Change Name appears and you might want to discuss it with your teacher about the best way of actually labelling it, whether it's year group, whether it's class, whether it's your name.

But what really needs to happen is you really do need to make sure that you name it after the project that you are doing, rather than just your name.

Because you're gonna do multiple projects hopefully, in Tinkercad and this is just one.

So you need to make sure it's renamed with a, talk to your teacher about the best name that you want to actually use.

Okay, let's get on to Task B.

We know what we're going to be doing.

We're gonna be looking at outputs this time.

And what we'd like you to do is to actually have a go at coding and simulating a show string output, so that when button A is pressed, then a word will appear, just like Jacob did earlier.

So here's an example of when button A is pressed and you show string Car.

Off you go, I'd like you to look, remember we're doing this within Tinkercad, so Tinkercad Circuits.

Use the coding blocks that we've got on the screen there.

And you want to think about the different words that you might be using for the show string that will appear on the Micro:bit.

And then what we want you to do is to code it, but not just code it, but also simulate it as well.

Remember it's that start simulation which will then turn as a green button.

You can see it on the screen there, and then you click on the green button, it'll say, Stop Simulation, it will go grey again.

Right, that is task one, off you go.

Okay, well done, let's move on to Task Two.

And you need to repeat that for other inputs such as button B.

So remember we're thinking about what output might be for button B.

So if you've chosen, going back to Learning Cycle One, where you chose different inputs and how they're going to, which type of traffic they're going to be doing, then maybe you'd like to repeat this for other inputs such as button B or for tilting it, or for whatever you wish.

But I would keep to the buttons just for simplicity for the moment.

Right, so now you'll be able to have multiple levels of different coding blocks on the right hand side in the code editor, so that when you click on different buttons or you click on A and B together or you tilt it.

And you can tilt that using the display, that's underneath the Micro:bit, you can actually use that and actually tilt it whichever way you wish, and it will recognise it.

So have a go, have an exploration of the code editor and the workspace and how we can use inputs to affect the different outputs.

All right, off you go.

Right, and the last thing now to do is to name your project so that you will recognise what this actually is.

Again, talk to your teacher about what is a sensible name for your project.

And we've talked about different examples that you could actually have.

Name it so you'll recognise it, because you might want to come back to this at a later date.

Okay, good, do that, and then task B will be completed.

Right, well done, so here's an example of what Alex did.

He coded four outputs to four inputs and named the project.

And you can see on the right hand side in the code editor there, he's actually got on button A being pressed, B being pressed, on tilt left, so when he tilts it to the left, then the bus will appear.

If he tilts it to the right, then the bicycle will appear on the LED screens.

And he's used the compass and buttons A and B.

Now, you can also see that he's actually renamed his project, he's named it, LED Output show string from inputs.

That's just an example.

I'm sure you can come up with a different example with yourself and your teachers.

Okay, good, well done everybody.

Some really good coding and really good thinking about the Micro:bit.

Let's go through the Summary of today.

So a Micro:bit has inputs such as buttons, a compass, sensors, a microphone and more.

A Micro:bit has outputs such as an LED display and a speaker and there's others as well.

And designers make choices over which inputs and outputs to use.

That's great, thank you very much for being with me today.

I hope you understand about all the different Micro:bit inputs and outputs and that we don't need to use them all, we're just gonna use a few.

And that it's really important to choose the inputs and choose the outputs that are going to be worthwhile to be used.

Well done today, you've worked incredibly hard, and I look forward to working with you next time.