Ejemplo n.º 1
0
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)
Ejemplo n.º 2
0
 def test_c_chord(self):
     r = create.Create(SERIAL_PORT)
     sound.c_chord(r)
     time.sleep(2)
     r.shutdown()
Ejemplo n.º 3
0
 def test_c_chord(self):
     r = create.Create(SERIAL_PORT)
     sound.c_chord(r)
     time.sleep(2)
     r.shutdown()