Data Sheet
Piano for micro:bit User Manual
7 / 10
When touching the piano key C, micro:bit will display “C”, if you touch D, then micro:bit will
also display D, if nothing is touched, it won’t displaying anything.
3 CONTROLLING RGB LED COLORS
Placement steps
Here we will omit some of the basics as they are mentioned above in this tutorial.
Drag the “set LED_Color” 4-row block directly off the WSTouchPiano. Here the difference is
at the back of each LED_Color. Add to the back of each LED_color block 4 new blocks as follows.
LED1 and LED2, which are in WSTPPiano, and LED3 and LED4 by clicking “… More” just under
Neopixel
Note that: right after red, green, blue there’s a small field to fill in numbers. In fact this block
is made of the composition of the three primary colors called RGB. Each color can set a
brightness level of 256, within the range 0-255. By combining 3 different colors range, it can
produce 256 x 256 x 256 different colors. You can look up color table on the Internet for each
corresponding color combination.
Experiment phenomenon
When a piano key C is pressed, the four LEDs on the board will light in red, green, yellow
and blue respectively.