Your first Micro:bit project
The Micro:bit is a kid-friendly microcontroller. Microcontrollers are a bit like computers but simpler and less powerful. I really like the Micro:bit because it is easy to program and allows me to interact with lights, sound, motors and many other fun things
To write code for the Micro:bit you go to this site:
https://makecode.microbit.org/#editor
This is what it looks like.
The thing in the middle contains all the coding blocks (Basic, Input, Music ...). You can drag them on to the right side of the screen to build your program. At the start you get the "on start" and "forever" blocks. Finally, the thing on the left is the simulator. Here you will see what your code does
Today we are going to do a simple project to get some skills. I will need these skills for a cool project that we call "Vortex". We will talk about "Vortex" in a future post
When you look at the Micro:bit you will see that it has 2 buttons ("A" and "B") and a set of 25 lights that engineers call LED. We are going to use all these in this project. Go ahead and find the icons in "Basic" and "Input" and put them together like this. The "show icon" block has a few pictures you can use in your code but you can also draw your own pictures if you want
To test your code click button "A" or "B" in the simulator. As you can see I pressed button "A" and it is showing a smiley face
The simulator is fun but it is even more fun if you get a real Micro:bit. If you are in Australia you could get one here. In the next post I will show you to save your code and load it into the Micro:bit
Comments
Post a Comment