Adding the electronics to your fish

The first step in adding the electronics is to add a servo controller; you'll use the same controller that was introduced in Chapter 3, Building a Wall-E Robot. First, you'll hook the three servos up to the servo controller, like this:

Adding the electronics to your fish

Now you can connect the servo controller to the battery. This is a bit complicated, as you'll need to connect the battery to the servo controller and to the Raspberry Pi. For the connection to the Raspberry Pi, you'll want to use a voltage regulator to convert your LiPo battery voltage to the 5V required by the Raspberry Pi. Here is an image of such a regulator:

These are available ...

Get Raspberry Pi Robotic Projects - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.