Code for robots balancing on two wheels, made with various robotics platforms.
Jupyter Notebook C Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


This repository holds code for robots that balance on two wheels, made with various robotics platforms.

Currently available platforms

  • LEGO MINDSTORMS EV3 (ev3dev/Python):

    • Building instructions
    • Add a Touch Sensor to Port 1. I added it just like the Gyro, but on the other side of the brick. This will be the program's safe stop button.
    • Run the program like any other ev3dev Python program
      • Transfer and and to your EV3, and put them in the same directory.
      • To turn them into executable scripts, run:
        • chmod +x
      • Now you can run the program: ./
      • Or, use the VS Code IDE for convenience.
      • Wait for the program to start (up to 10 seconds)
      • Hold segway up right with its resting wheels on the ground and press the Touch Sensor
      • Press the Touch Sensor again to stop. Then again to restart, if you like.
  • LEGO MINDSTORMS EV3 (standard EV3 software)

  • VEX IQ (RobotC):