This tutorial was contributed by Luo Beiyu from the National University of Singapore.
Step 0 – Pre-build Overview
1 x BBC micro:bit, 1 x Micro USB cable, 1 x Breakout board,
1 x ADKeyboard, 1 x OLED, 1 x Servo, Wires
- Get to know the ADKeyboard, OLED and servo
- Make something with a servo
- Make something with a OLED
Step 1 – Components
Step 2 – Pre-coding
Note: If you get a warning telling you some packages will be removed because of incompatibility issues, either follow the prompts or create a new project in the Projects file menu.
Step 3 – Coding
If the button A of the ADKeyboard is pressed, the servo will turn to angle 70 and the OLED will display “Loading food“.
Or else,if button B of the ADKeyboard is pressed, the servo will turn to angle 20 and the OLED will display “Feeding the fish“.
You can adjust the servo angle to suit the project.