Single axis self-balancing reaction wheel inverted pendulum. This thing is inherently unstable and a common challenge in control theory. The mechanical structure is built using only Lego parts. Motor is also Lego. Angle sensor and electronics are not Lego.