warning

Content guidance

Equipment requiring safe usage.

Adult supervision recommended

video

Lesson video

In progress...

Loading...

Hello, my name's Mrs. Finlay, and today's lesson is titled Music To My Ears.

We're going to be using the BBC microbit to programme some of your favourite chart tunes.

Lots of excitement we're going to have and make sure that for today's lesson, you are somewhere quiet where you can hear my voice and you can hear your own music.

For today's lesson, you will need some cardboard, scissors or tape and maybe a ruler and a pen.

You also need access to the microbit software, and I'll explain this a little bit more later on.

So today's lesson, you've already done the intro quiz.

We're going to have a little microbit demonstration.

We're going to make a tune, we're going to have a little challenge called lights, camera, action.

And then as always, there is an exit quiz.

So let's look at today's keywords.

Okay, so keywords, so the first key word we're going to look at today is input.

And this is a description of how we activate the programme.

So it might be on the microbit that we shake the Microbit or we press button A for example, to start the programming.

The second word in our keywords is loop.

Now this refers to the control, which can be repeated within the programme.

So it might be something like you have a line of musical notes but you actually want to repeat those three times.

And so you can create a loop, rather than having to keep putting the same code in and finally, logic.

And this refers to instructions which control the level of decision-making within your programming.

So let's look at this new microbit.

There are 25 LED's on there, which give you a really great display and you can change what you want to see.

You have got a push A and B button.

So that's really great for the inputs.

And that was one of our key words this week.

You can shake it, you can tilt it.

There's temperature senses, compasses, speakers on there and using the make code, which we're going to be using, you don't actually even need a physical microbit.

You might have them at school and that's fantastic.

But for our lesson today, we're going to programme them and use the make code that's available on the internet.

Okay, so let's have a think about how we could use this.

Can you find or think of products in your home which, make a noise to signal the end of something.

Switch on and off after a period of time or switch on and off after temperature change.

So let's look at the first one.

Can you think of something or can you find something, so if you're going to go and find it, you need to pause the video but can you think of something that makes a noise at the end of their cycle or the end of a programme? This is what I got, washing machine, dishwasher electric shower and microwave.

My microwave goes ding, the dishwasher makes a little noise and the washing machine makes an amazing little tune, it's about six or seven little notes it does.

What about something that automatically switches off after a period of time? What did you come up with? Any of those on the first list maybe we could use? let's have a look, I've got microwave, yeah, so you could put your soup or your baked beans in the microwave for two minutes.

Washing machine, you'll have a timed cycle, tumble dryer, exactly the same time cycle.

Television, now interestingly, if you don't interact with the TV, it has an energy saving feature most of them, and they will switch off after a period of time.

You've may have had that if you've ever fallen asleep in front of the telly, maybe you're too young for that.

Okay and finally, switching on or off after a temperature change, can you think of anything that might do that? Let's have a look, yeah, I've got kettle, that was a good one and also your heating system.

So if you have your thermostat set to, I don't know, 18 degrees and your house is at 18 degrees, it will stop heating your house because your house is warm enough.

We're going to use the make code section of the microwave bit today.

And this will give you a simulation of what you are coding.

So, in order to get prepared, you may need the help of your parent or carer to access the website.

But I've put a link to the microbit make code, in grey on the page.

So if you press pause now, you'll be able to type that in and get attached.

Okay, so I'm just going to show you very quickly what you're going to be looking at when you get it.

So I'm going to click on that and it's going to open up for me, here it is.

And this is exactly what you should be looking at, well done.

Once you go into make code within the Microbit, you've got this screen and what we're going to do, is you're going to create a new project and I'm going to call mine Oak Academy Demo.

Okay, you can see I've got lots of projects along the bottom that I've been messing around with.

So once we're into this, you then have the microbit that will appear on the left.

You've got all your building blocks tools in the middle here, and then this is where you're going to write your code.

There's my Microbit, it's turned up.

Okay, and this is a new microbit.

So you might have different ones at your school.

I'm going to give you a very quick demo as to how this works.

I'm going to go to my building blocks in the middle.

I'm going to just drag, show LED's and I'm going to drop it in the, on start.

Colour in some little LED's like that.

Okay, and then when I press play on my microbit over here, there we go.

I can see what I have coded and it's that simple.

This might be the time when you get your make a code up on your computers or whatever devices you are using.

And you just have a very quick go at dragging show LED's in from the basics, just to have a go, to make sure it all works.

I just wanted to show you what a mobile make code looks like.

It's exactly the same, except for on the left-hand side, you have got all your building blocks, all your icons.

So you can do this if you're working on a mobile phone device.

So we're going to do some coding.

So nice and easy, building blocks, dragging and dropping.

We're going to do, on start, We're going to use on start, we're going to go into music.

So the red one.

There we go, we're going to click on play melody and we're going to drag it out and click it in.

Now when we click on play melody, it opens up this editor and all we're going to do, each ones of these lines we get to choose which sound we want.

So for example.

Or, or, and if I put them in a sequence.

And I can keep going.

Or.

Okay, when I'm done, finish that, I can up the tempo a little bit, make it a little bit faster, there we go.

And what would I do if I wanted to test that on my microbit do you think? It moved, there we go, it must've heard me say, we're going to press play, okay, so I press play.

Okay, now I could copy that.

So if I select my red button and I control C control V, copy it, I can drag it in.

I can click on it and change it.

Or obviously, I can go back into music.

I can find the melody that I want to play, and I can drag and drop and I can select.

And I might want to change those tempos as well.

So I might want to change that to 120, and then I'm going to create the whole thing together.

And then lots of times, companies have jingles or melodies that they use to go alongside their logos and things like that.

And this leads us really nicely into our next task.

Okay, so here is your challenge.

Using the knowledge I have just shared with you, I would like you to come up with your own jingle or it could be I part of a chart song that you really like.

When you've put this together, maybe send it to your teacher using the share button or find someone in the home who you can share it with and see if they can guess what it is.

So remember, you can repeat those lines and you can use all those different notes as well.

So good luck with your first challenge.

Hopefully that was pretty successful.

What we're going to do now, is we're going to use sensors to make sounds.

So let's have a look.

We're going to do this piece of coding.

So the pink is the sensor or actually the input, what is going to happen? And that's going to be movement.

We're going to shake our microbit.

We're then going to get the micro bit to play a tune, as well as show a display of LED's.

Okay, so what is the change or rather, what is the sensor that's making that microbit play? What is the input there do you think? What's making it play the melody and show the LED's? That's right, it's the actual physical movement, it's the physical shaking.

Now, you've got a choice.

You can either pause the video and have a go at doing this yourself.

Or you can watch the video where I demonstrate how to do it.

Okay, so what we're going to do is we are going to have a go at using shake as an input, we're then going to add a melody and we're going to add some LED's.

So this is what it will look like, okay.

So on shake, we're going to add the melody, we're going to put the programming LED's in.

So I'm going to drag and get rid of that for a minute.

It's quite good to show you actually, how you bin stuff.

So I'm going to click on input.

Okay, I'm going to go on shake, so drag and drop that.

I'm going to go into music and this time, I'm not going to do my own melody, I'm going to scroll all the way down.

And I'm going to go into start melody.

Drag it off, pop it in.

Now this is really cool.

This is where you can choose what you want to have.

So I'm going to have.

I'm going to put that one in there and I'm going to have it repeating forever.

And then, I'll need to put my LED's in.

So I'm going to grab my LED's, I'm going to pop that under there and I'm going to put in pattern like that.

Maybe four of those.

Then the next thing I want to do, is I want to play this but it's not playing, wonder why that is.

Haven't shaked my microbit.

So shake, shake, shake, or you can press on it like that.

Wicked, it's not stopping, why's it not stopping? Look at the code, I've got it on forever haven't I, that was a bit silly, let's do it for once.

Okay, what if I wanted to change tune, what could I do? Good, yeah, I could change.

So this time we're going to change it to, oh, funk.

That sounds fun.

I'm going to put it back on forever as well.

My microbit's not working, why is it not working? What have I not done? Go to the top of the code.

Yeah, I haven't shaked it.

Shake my microbit.

Okay, amazing, I'm going to stop it.

I want you to have a go now.

Use shake as your input, have play with the different melodies.

Maybe repeat forever, and let's see if we can get this code written.

We're now going to move on and we're going to look at temperature control.

We're going to split this up a little bit.

I have got a basic code at the top and then I've got a more advanced code later on.

And you can choose which one you want to do.

As before, it might be that you want to pause the video now and have a go at coding these, and then check your answers, that's up to you.

So the first one will give us a reading of the temperature.

The second one will also give you an image at whichever temperature you would like.

Okay, so not only will it tell you the temperature but it's also going to give you a smiley face if it's above 20 degrees.

So let's go now and I'm going to show you how to set the temperature sensor.

Okay, so let's have a go at that first temperature code.

So we are going to input.

So our input is going to be this time that we're going to use a button and we're going to go into basic and show number.

Now I know we're looking for temperature but I'm going to show you something really cool.

So we're going to drag that show number in there.

Now we don't want it to show a number.

We want it to show the temperature.

So I'm going to go back into inputs and find, if I look down through here, I've got lots of different inputs I can use.

So I've got light level, compass heading.

I've got temperature, that's what I want is temperature.

So I'm going to drag the temperature and do you see, it creates that little red circle, and then it creates a sticky line.

And that becomes like a variable we can change it in.

So I'm going to change it in.

Now my microbit's gone dark, let's see why.

If I go over here, nothing has happened.

How am I going to do my input, can you remember? I'm not shaking it this time, what am I doing? Look at the programming.

Yeah, I'm pressing button A.

So if I press button A, 21 degrees, so I've got this temperature gauge here, I press A, 21.

Can you see the string of LED's going across? What's really great is I can lower this.

So what should I see now when I press the button A, what degree? Look on the microbit.

Yeah, three degrees.

Okay, if I ping it up to 13, I will see 13 degrees.

So again, we're going to string that one across.

Brilliant, so I suggest you start this one first.

And then if you're feeling really confident, have a go at the second temperature one.

Now to do that, you're going to use logic, which is what we looked at as one of our key words.

So you've got the logic commands down there.

I'm going to leave you with that, to see if you can do it yourself.

So temperature, have a little go at this one first.

Here's today's challenge, music to my ears.

Now, the reason it's called music to my ears, is that we are going to design a product.

That's going to help people who are hard of hearing.

Now you may have noticed that I actually wear hearing aids, so I've got to take one out to show you.

And now I've gone all wonky, 'cause I've got hearing aid, that side is fine.

So my hearing aids are really small.

You can't really see them.

They fit really nicely in my ear.

So that bit goes in my ear, that little bit there.

And then this bit goes around the back.

And if you have a look at my other ear, you can only see a tiny little wire and hardly at all.

Now what's really cool about my hearing aids, is that I can Bluetooth them to my phone.

So on my phone, I have got a little app for my hearing aids.

If I just find it, there we go.

And it tells me what percentages my volume's at, but I can also Bluetooth things like radio or devices within the home to my hearing aids.

And this is where the idea for today's challenge comes.

So, being able to hear in the home can be really difficult if you're hard of hearing, especially when there's background noise.

So if we've got lots of children around or if there's washing machines going, I can often find it very difficult to hear other things that are going on.

For example, I might not hear my kettle boil.

Hearing aids can work on Bluetooth and can be paired to devices.

So I compare for example, my radio to my hearing aid.

So I can be listening to the radio while I'm doing work at the table.

You're going to design a system that will alert a user in the home to a device finishing a cycle.

And this is where we're going to think back to the work we did right at the start of the lesson, when we thought about different products that use different cycles.

So let's look at the challenge in a bit more detail.

There are three parts.

First of all, I want you to work out how you want to control your work.

So for example, when we did our temperature changes or our noise outputs, we started with a shake.

Now it might be, that you want to have something attached to a washing machine.

And when it stops shaking, that's when the programme kicks in and alerts the user.

It might be that you want to have it onto a kettle.

So when the kettle flicks off, 'cause it's the right temperature, that's like pressing button A and that's when your jingle or your visual display can come up.

So think about how you want to control your work.

Second thing, I want you to create a programme.

So if the kettle flicks off, problem one, then you're going to press button A, the kettle will automatically press button A for you.

And then you might have a jingle and you might have an LED display.

Now that jingle can easily be paired to the hearing aids, which is great.

But also, there needs to be some kind of physical output.

So I'd like you to model or draw, how the microbit will be housed and where it will go.

So you might decide to make it wearable.

So you want to have it like a watch.

You might decide to have it so it hangs on a door.

You might decide to have it so it's magnetic and it fits onto the front of the fridge, or it can move around the house.

So there's three parts to today's challenge.

First of all, how will you control your work? So are we going to link something to a kettle and we're going to use the flicking off of the kettle to activate our code.

I would like you to, if you can, programme your microwave bit and get the code to work.

If you don't feel that you can do this, you could always write your code down.

And then thirdly, I'd like you to design something to house your little microbit.

It'll be really great to see some of these microbits drawn out.