def dance(r, num_repeats=1): """First light up, then play a distinctive sound, continue with a robot dance Keyword arguments: r -- robot object and serial connection num_repeats -- number of loops to run Returns: nothing, changes lights, makes sound and moves. """ for i in range(num_repeats): look_around(r) c_chord(r) spin(r) shake(r) twist(r)
def test_spin(self): r = create.Create(SERIAL_PORT) move.spin(r) time.sleep(2) r.shutdown()