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

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

src/b/r/BrickPython-0.4/ExamplePrograms/MotorController.py   BrickPython(Download)
    def rotate(self, degrees):
        'Rotate motor A through *degrees*'
        self.stopAllCoroutines()
        motor = self.motor('A')
        logging.info( "Rotating motor A %d degrees" % degrees )
    def setSpeed(self, speed):
        'Set the speed of motor A'
        self.stopAllCoroutines()
        motor = self.motor('A')
        logging.info( "Speed for motor A %.2f" % speed )