A self balancing robot using Python and the Raspberry Pi 2. Angle calculations done with the help of the MPU6050 IMU. libraries used: mpu6050-raspberrypi 1.0.2 https://github.com/Tijndagamer/mpu6050 ,Rpi.GPIO
Just enable I2C on your Raspberry PI: https://www.youtube.com/watch?v=FloRfIeuEoE I connote you to make a directory, name it as you like and make a python file with the name equsant.py and copy the code from (equsant.py is the Github file from this Project) into that just created python file. Afterwards just do the same thing with the pidcontroller.py (create a python file and name it pidcontroller.py and save the content of (pidcontroller.py is the Github file from this Project) file into it) file it is important to save both of the files in the same directory
Most likely you are also going to need to change the PID values in the file equsant.py
Enjoy