Mini-segway stabilizer code