The BBC micro:bit is a pocket-sized computer that introduces you to how software and hardware work together. It has an LED light display, buttons, sensors and many input/output features that you can program and physically interact with.
These features include an accelerometer, which can tell when the Micro:Bit is moving, a compass which shows the direction it is moving in, and a radio and Bluetooth transmitter that can interact with other devices.
Turn your Micro:Bit into a step counter (or pedometer) to help you track how active you are - and learn some coding at the same time!
Key vocabulary: VARIABLE
A variable is a way of storing information in a computer program. Think of a variable like a container and the name of the variable as the label on the container which shows us what is inside. Programmers give their variables names so they can quickly and easily refer to them as they write their code.
Connect your Micro:Bit to your Chromebook with the USB Cable
Watch the video to your left to see the full coding sequence
Launch the Make Code editor on your Chromebook and open a new project
Follow the instructions in the video and download the code file (it will be saved in your downloads folder as a .HEX file)
Drag and drop the .HEX file to your Micro:Bit by using the "Files" app on your Chromebook
Click the eject button for your Micro:Bit and unplug it from your Chromebook
Plug the battery pack in to your Micro:Bit and test it out!
Try using a rubber band to put the Micro:Bit around your ankle or foot or just hold it in your hand.
Extra things to try out after your are finished your coding!
Measure the length of your average stride then walk to a certain area of the school. By multiplying the number of steps you take by the length of your stride, you can calculate the distance you covered. Compare your distance to a friend. How accurate are the Micro:Bits?
Modify the code so it shows your current step count when you press a button.
If you find that the code only counts every other step, modify the code to multiply the ‘steps’ variable by two when it’s displayed.
Modify the code so the Micro:Bit displays an image or congratulations message once you pass a certain number of steps.
Recreate a classic toy from the 1950s with your micro:bit and customize it to make it your own.
Play this classic game with two micro:bits and learn about selection, variables and random numbers at the same time.