When learning how to program the beating heart, you probably noticed lots of other blocks in MakeCode. Now is a good time to explore what the micro:bit and bit:booster can do by trying out some of these blocks. We’ll get back to them later, but why not have some fun exploring?
Step 1: Review what we can do with everything we have in hand.
Step 2: Try out some simple programs to understand how these features work.
Too easy? That’s great, you’re ready for the next challenges!
The micro:bit has many built-in features to explore and the bit:booster adds more and makes it easy to connect sensors and motors. Right now, let’s explore what we can do with only the micro:bit and bit:booster without any add-ons.
LIGHTS - 25 red LEDs in a 5X5 matrix- This is what we used to test make the heart beat. There are a number of blocks that control this in the Basic and Led tabs. Design your own icons, show text, plot data… these 23 LEDs are full of possibilities.
LIGHTS - 10 Neopixels in a matrix- the bit:booster adds 10 programmable lights called Neopixels that you can program both the color and the brightness. This takes a little more work to figure out. You can reference the card that came with the bit:booster or use this link to see it again.
SOUND - Piezo buzzer - the bit:booster has a built in buzzer for playing music. Use the Music blocks to play pre-programmed melodies or build your own note by note.
SENSOR - Accelerometer -The micro:bit has a chip that can measure acceleration, pitch, roll and compass direction. This means the micro:bit can sense how fast it is speeding up or down, which direction it is in, and even where North is (or whether there is a magnet nearby.
If you look at the “input pins” you see lots of ways you can use this sensor, from knowing which direction is up to measuring how fast it falls.
SENSOR - Temperature The micro:bit can sense temperature.
SENSOR - Light - The 5X5 LED matrix can be used to measure the light level. It measures the light level from lowest (0) to brightest (255). Notice that this code is in an oval.
SENSOR - Buttons - The microbit has two buttons labelled A and B. They can be used as simple controls, pressed either individually or separately.
RADIO - Radio and Bluetooth - The micro:bit has built in bluetooth and a 2.4Ghz radio. This allows it to communicate to the computer and other micro:bits.
The micro:bit can be connected to external components (sensors, motors, screens…) by coding to its pins. There are up to 20 pins available to use! (some of them are used by the built in components). We will ignore these for now… don’t worry, you can always use them in the future.
We will dive into many of the blocks in more detail in future lessons but now is a good time to poke around and explore the blocks and see what they do. Some of the blocks (like the Music blocks ) will play in the emulator window without downloading onto the micro:bit. Spend some time testing the blocks. Don’t worry if you can’t figure out how to use them, we’re just looking around now.