There is no better way to learn about robots and coding than building and programming your own robot. The Balboa 32U4 Balancing Robot Kit is one of many robots you can buy to learn more about balancing robots. It can pop itself up and drive in a figuer-8 pattern while balancing playing music with its buzzer.
The Balboa 32U4 is user-programmable and based on the Arduino-compatible ATmega32U4 AVR microcontroller. It comes with a full inertial measurement unit to estimate orientation and balance. An optional interface is available for connecting a Raspberry Pi.