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;
Finding the website Go to When you arrive on the home page … Click here
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
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
Hint … This is an example of the correct solution
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
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.
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;
Hint This is an example of the correct solution
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?
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.