Microbit Tutorial 3.4 Lesson 20 “Colorful gesture lights”
1.Learning goals
After you download the program,we can hold the micro:bit and use gravity sensing of mirco:bit to make different gestures to control the color of the light as well as the light up and the light off. We can see in the picture, when we pick up the micro:bit and the array is up, it will light up the white light composed of red, green and blue. In addition, different gestures can also show red, green, blue ,yellow, etc.
2.Preparation
Hardware:
- 1 x Micro:bit Board
- 1 x USB Cable
- 1 x RGB module
- 4 x Dupont line
- 4 x Alligator clip
Then the micro:bit is connected to the computer through USB, and the computer will pop up a U disk and click the URL in theU disk to enter the programming interface.Input this URL https://github.com/lzty634158/yahboom_mbit_en to get the package.
Handmade:
GND of RGB module connect to GND of Micro:bit
R of RGB module connect to P0 of Micro:bit
G of RGB module connect to P1 of Micro:bit
B of RGB module connect to P2 of Micro:bit
4.Search for blocks
5.Combine blocks
The code of the experiment: Lesson20 Colorful gesture lights.rar
Tutorial
- Yahboom Microbit Starter Learning Kit for Kids BBC Micro bit Science Set Tutorial
- Last Tutorial>> 3.3 Lesson 19 “Automatic door”
- Next Tutorial>> 3.5 Lesson 21 "Target score"