Пример #1
0
    def test_mindsensor_psp_sensor(self):
        from ev3.mindsensor import PSP

        pspSensor = PSP(robot.SENSOR_1)
        print("press up")
        test_util.count_down(3)
        test_util.wait(5, lambda:print(pspSensor.get_up()))
        print("press down")
        test_util.count_down(3)
        test_util.wait(5, lambda:print(pspSensor.get_down()))
        print("left stick")
        test_util.count_down(3)
        test_util.wait(5, lambda:print(pspSensor.get_x_left()))
Пример #2
0
 def test_time_sync(self):
     motordevice.time_sync(PORTS, 20, 50, 5000, 1)
     
     test_util.wait(5, print_motor_info)
Пример #3
0
 def test_step_sync(self):
     motordevice.step_sync(PORTS, 20, 50, 1000, 1)        
     test_util.wait(10, print_motor_info)   
Пример #4
0
 def test_time_speed(self):
     motordevice.time_speed(PORTS, 20, 2000,5000 , 2000, 1)
     test_util.wait(10, print_motor_info)
Пример #5
0
 def test_step_speed(self):
     motordevice.step_speed(PORTS, 20, 180, 720, 180, 1)
     test_util.wait(10, print_motor_info)
Пример #6
0
 def test_time_power(self):        
     motordevice.time_power(PORTS, 20, 2000,5000 , 2000, 1)
     test_util.wait(6, print_motor_info)
Пример #7
0
 def test_step_power(self):        
     motordevice.step_power(PORTS, 20, 180, 720, 180, 1)        
     test_util.wait(6, print_motor_info)
Пример #8
0
 def test_speed(self):
     motordevice.speed(PORTS,20)        
     test_util.wait(5, print_motor_info )
Пример #9
0
 def test_power(self):
     motordevice.power(PORTS,20)
     test_util.wait(5, print_motor_info )