User Manual
9 10
1
2
3
1
2
3
Project 3 :  LED Bar Control
Diculty Level
Part List
Description
3. LED Bar Control
In this demo you will learn to control 
the LEDs on your micro:bit with the 
rotary angle sensor. The number of 
LEDs turned on will increase or 
decrease as you rotate the knob on 
the sensor.
1x Grove - Rotary Angle Sensor(P)
1x Grove Shield for micro:bit
1x micro:bit
Steps
 Add basic block forever, then add Led block plot 
bar. Replace the rst value with pin block analog 
read pin P0, and change the second value to “1023”. 
Add basic block pause (ms) (100).
4. Rotate the knob on the rotary angle sensor and 
see the change of LED Bar.
Try to change the “up to” value from 1023 to other numbers and see what will 
happen. Is there a difference compared to Demo 2?
2. Hardware connection: Connect the rotary angle 
sensor to P0 port of micro:bit
3. Click Download to transfer your code in your 
micro:bit!
1
1
2
2
2
1
3
P0/P14










