Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/b/r/BrickPython-0.4/ExamplePrograms/MotorController.py   BrickPython(Download)
        logging.info( "Rotating motor A %d degrees" % degrees )
        co = motor.moveTo( motor.position() + degrees*2 )
        self.addActionCoroutine( co )
 
    def setSpeed(self, speed):
        logging.info( "Speed for motor A %.2f" % speed )
        co = motor.runAtConstantSpeed( speed )
        self.addActionCoroutine( co )
 
    def onKeyPress(self, event):

src/b/r/BrickPython-0.4/ExamplePrograms/TrialApp.py   BrickPython(Download)
        for c in "ABCD":
            self.motor(c).zeroPosition()
            self.addActionCoroutine(self.motor(c).runAtConstantSpeed(180))
        for c in settings:
            self.addSensorCoroutine(self.showChanges(c))