BBC Microbit Getting set up and making your first program.

12
BBC Microbit Getting set up and making your first program

Transcript of BBC Microbit Getting set up and making your first program.

Page 1: BBC Microbit Getting set up and making your first program.

BBC MicrobitGetting set up and making your first program

Page 2: BBC Microbit Getting set up and making your first program.

Learning objectives

Understand:- What is a variable;- What is an output;Be able to:- Start using the BCC Microbit website;- Create a simple program in Block Editor that uses variables and

produces an output;

Page 3: BBC Microbit Getting set up and making your first program.

Finding the websiteGo to https://www.microbit.co.ukWhen you arrive on the home page …

Click here

Page 4: BBC Microbit Getting set up and making your first program.

Getting to Block Editor

We are going to be using Block Editor for this lesson

To start making our first Microbit program just click here

Page 5: BBC Microbit Getting set up and making your first program.

Task 1 - Hello world

Block Editor is similar to Scratch, it uses blocks!

Using the menu on the left hand side of the UI. Write a program that will output a “:-)” as a string

Page 6: BBC Microbit Getting set up and making your first program.

Hint …

This is an example of the correct solution

Page 7: BBC Microbit Getting set up and making your first program.

Running a program

To run the program, click the big run button at the top of the UI

Then watch the emulator at the side of the screen

Page 8: BBC Microbit Getting set up and making your first program.

Variables

Variables are like boxes. You can store things in a box.However, this box needs a unique name and whatever is stored in the box, we call a value.So, a variable is something with a unique name that we can store a value in.

Page 9: BBC Microbit Getting set up and making your first program.

Task 2

Using the blocks below, please do the following.1. Create a variable called name;2. Set the variable name to the string James;3. Show the variable name;

Page 10: BBC Microbit Getting set up and making your first program.

Hint

This is an example of the correct solution

Page 11: BBC Microbit Getting set up and making your first program.

LEDs images

As well as outputting strings, we can also output images using the LEDs.

Using the create image block we can manipulate which LEDs are on, and which are not

We can output an image using the show image block.Which image do you

think that this would display?

Page 12: BBC Microbit Getting set up and making your first program.

Ready for a challenge?

Pick either a silver or gold challeng.

They are the same challenges, but if you are going for gold, you are on your own.

If you go for silver, you can have a little help.