Automatic Door | Boson starter for micro:bit 07

0 3376 Easy
projectImage
projectImage
projectImage
projectImage
projectImage

STEP1: Connect push-button module to pin P0 of the expansion board; connect servo to P1.

projectImage
projectImage
projectImage

STEP2: Programming

1. Drag “set pin P9 servo to…degree” block in “actuator” module. Change P9 to P0. Set pin P0 to control servo’ s value.

projectImage

2. Set: if the button is pressed, the servo rotates for 100 degree and the LED display “o”. Otherwise, the servo rotates for 0 degree and the LED display “×”. Here we need to use “if…then…else” statement.

projectImage

3. Run the program

projectImage
projectImage
projectImage
projectImage

STEP1: Connect the servo to pin P1; connect the motion sensor to pin P0.

projectImage

STEP2: Programming

1. Read the digital pin P0 to get the digital signal data of the motion sensor.

projectImage

2. When the motion sensor detected that there is people passing by, the servo rotates for 100 degrees; otherwise, it rotates 0 degree. We need “if…then…else” statement here.

projectImage

3. Run the program:

projectImage
projectImage
projectImage
License
All Rights
Reserved
licensBg
0