Fish Feeder

Create a fish feeding machine! Two red buttons on ADKeyboard will control the movement of the servo, and a message will always be displaying on the OLED, showing the status of the servo.

You'll need

  • 1 x BBC micro:bit
  • 1 x Micro USB cable
  • 1 x Breakout board
  • 1 x ADKeyboard
  • 1 x OLED
  • 1 x Servo
  • 8 x Wires (Optional)

Step 1


Connect the USB cable to the micro:bit and then the micro:bit to the breakout board.


1x micro:bit
1x Breakout board
1x Micro USB cable

Step 2


Plug in the ADKeyboard to Pin0 and the servo to Pin1. Make sure the colour of the wire follows the coloured pins on the breakout board!


1x Breakout board
1x ADKeyboard
1x Servo

Step 3


Only the two red buttons (button A and button B) on ADKeyboard are used in this project.

Step 4


We first need to add a package of code to be able to use our kit components.

Step 5


This will open up a dialog box. Copy and paste this link into the Add Package… text field:

Select the search icon or press enter, then select the Tinkercademy button.

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 6


Click on Tinkercademy inside the Code Drawer to find our custom blocks for the various components in your kit.

Step 7


Always initialize the OLED at the beginning. Set the height and width to 64 and 128, the dimensions of the OLED.

Step 8


Since there are only two conditions, we need only one ‘else-if’ statement.

When the button A of the ADKeyboard is pressed, the servo will turn to angle 70 and the OLED will display a message. Else if button B of the ADKeyboard is pressed, the servo will turn to angle 20 and the OLED will display another message.

You can adjust the servo angle as needed.

Step 9


Finally! You have created a fish feeding machine!

Code and References

Completed this tutorial?

Spread the word! Let's get this trending on social media with #letsgethacking #FishFeeder