Awesome Open Source
Awesome Open Source


Developed by TKJ Electronics 2013-2020

The code is released under the GNU General Public License.

Build Status

This is the code for the Balanduino, the Open Source Balancing robot.

Arduino compatible

To use the Balanduino as a normal Arduino board you need to add the hardware add-on to the Arduino IDE.

See the Getting Started page for more information.


The Balanduino hardware consist of an ATmega1284P running at 10MHz.

A MPU-6050 3-axis accelerometer and gyroscope. The accelerometer and gyroscope readings are combined using a Kalman filter library. See my blog post: and source for more information.

USB Host support is implemented using the MAX3421E and the USB Host library:

Two VNH5180 motor controller ICs is used to drive the two motors.

More information can be found at the Wiki article:

Remote control

Game controllers

To control the robot you can use the following game controllers:

  • Normal PS3 Dualshock controller
  • PS3 Navigation controller
  • PS3 Move controller
  • PS4 controller
  • Xbox 360 wireless controller
  • Wiimote including support for the Motion Plus and Nunchuck extension
  • Wii U Pro controller


To pair with any of the PS3 controller please see the following section of the USB Host library readme:

To pair with the PS4 controller send: CPP; via the serial monitor. Then hold down the Share button and then hold down the PS button without releasing the Share button. The PS4 controller will then start to blink rapidly indicating that it is in paring mode.

To use a Xbox 360 wireless controller you need a special receiver. More information can be seen at the following link:

To pair with the Wiimote send: CPW; via the serial monitor and then press 1 and 2 at the same time on the Wiimote. On the Wii U Pro controller you should press on the sync button instead.

Android App

It it also possible to control the robot and adjust the PID values and others variables using the following Android application:

Google Play


Computer applications

You can also use your Windows, Mac or Linux based computer by using the following Processing application:

A dedicated Windows application is also available:

RC Transmitter

You can also use a RC transmitter. For now only Spektrum satellite receivers are supported.

You will need the following receiver and cable:

After that simply connect the red wire to 5V, black to GND and the yellow one to RX0.

To bind with the satellite receiver send BS; via the serial monitor and then follow the instructions.

Note that you might need to disconnect the satellite receiver from RX0 if it is already sending data, as it will corrupt your command.

The video below shows a video demonstration of it being used together with some FPV equipment:

Balanduino FPV demonstration

Video presentation

A video for the Kickstarter presentation can be seen below:

Kickstarter video presentation

A video filmed with a GoPro mounted on the robot can be seen below:

GoPro demonstration

Calibration of the accelerometer

If the robot tilts to one of the sides when you receive the kit, you might need to calibrate the accelerometer.

This is done by simply sending AC; via the serial monitor. After that simply just follow the instructions.


To download the entire repository including all submodules run the following command in a terminal:

curl | sh

Or simply download the daily updated ZIP-repository from our website:

If you want to clone the project then use the recursive command to clone all the submodules as well:

git clone --recursive

For more information visit the official website:, the forum: or feel free to contact us at [email protected].

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
c-plus-plus (18,963
hardware (176
robot (153
accelerometer (16