示例#1
0
    def test_set_heading2(self):
        orb = Sphero(MyTestCase.SPHERO)
        orb.connect()

        for angle in range(0,360,90):

            orb.roll(30,90)
            time.sleep(3)
            orb.set_heading(angle)
            time.sleep(1)
            orb.roll(30, 90)
            time.sleep(3)
示例#2
0
    def test_set_heading(self):
        orb = Sphero(MyTestCase.SPHERO)
        orb.connect()

        orb.set_tail_light(255)

        orb.set_heading(0)
        time.sleep(2)

        orb.set_heading(90)
        time.sleep(2)

        orb.set_heading(180)
        time.sleep(2)

        orb.set_heading(270)
        time.sleep(2)

        orb.set_tail_light(0)
        time.sleep(3)