BirdBlox Motor Mover
Create a program that remotely controls a servo motor using the BirdBlox app
Objective & Learning Goals
- Control Hummingbird outputs
- Use a tablet event (shaking) to trigger actions
- Attach a servo to servo port 1.
- If you have not already, attach the Hummingbird BLE adapter using the instructions here.
- Attach the external power cable.
- Open the BirdBlox app and connect to your Hummingbird.
- Tap Control to open the control category. Remember, if you have difficulty selecting the buttons, you can zoom to make the buttons larger.
- The program should start when the green flag is tapped. Drag a when flag clicked block to the middle of the screen.
- Attach a repeat forever block below it. This will allow us to repeatedly change the servo’s position.
- We want the servo to move only if the user shakes the tablet, so place an if block inside the forever loop.
- Select the Tablet menu.
- Move the Device Shaken block into your if block. When the user shakes the device, the program will run the blocks inside the if block.
- Select the Hummingbird menu and place a Hummingbird Servo block inside of the forever loop. The servo should move to 90° when the user shakes the tablet.
- After one second, the servo should return to 0°. The wait block is on the Control menu.
- Test your program! When you shake the tablet, the servo should move to 90° and then back to 0°.