That's the most challenging part. I built a balancing robot several years ago (video somwhere on my youtube) - with a Arduino Nano & Raspberry - The Nano did all the hard work of balancing, the PI...