コード例 #1
0
 def test_large_motor(self):
     get_input('Attach a LargeMotor then continue')
     d = LargeMotor()
     print(d.type)
     d.run_forever(100, regulation_mode=False)
     print(d.run)
     time.sleep(5)
     d.stop()
コード例 #2
0
 def test_large_motor(self):
     get_input("Attach a LargeMotor then continue")
     d = LargeMotor()
     print(d.driver_name)
     d.run_forever(100, speed_regulation=False)
     print(d.state)
     time.sleep(5)
     d.stop()
コード例 #3
0
 def test_large_motor(self):
     get_input('Attach a LargeMotor then continue')
     d = LargeMotor()
     print(d.type)
     d.run_forever(100, regulation_mode=False)
     print(d.run)
     time.sleep(5)
     d.stop()
コード例 #4
0
ファイル: test.py プロジェクト: bfic/BeerBot
class Track():
  """ Class Track represents caterpillar track for moving beerbot """

  def __init__(self, port, speed=100, **kwargs):
    self.port = port
    self.speed = speed
    self.motor = LargeMotor(port=self.port)
    self.motor.reset()

  def move(self, speed):
    self.motor.run_forever(self.speed, regulation_mode=False)   

  def stop(self):
    self.motor.stop()