示例#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)
示例#2
0
 def test_shake(self):
     r = create.Create(SERIAL_PORT)
     move.shake(r)
     time.sleep(2)
     r.shutdown()
示例#3
0
 def test_shake(self):
     r = create.Create(SERIAL_PORT)
     move.shake(r)
     time.sleep(2)
     r.shutdown()