We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to use this library in a special way, i need your help (i use the control+ hub) my main file is (main.py):
import curio import train if __name__ == '__main__': curio.run(train.main()) # this works curio.run(train.move()) # this doesn't
The second file is train.py
from curio import sleep from bricknil import attach, start from bricknil.hub import CPlusHub from bricknil.sensor.motor import CPlusLargeMotor @attach(CPlusLargeMotor, name='motor_A') @attach(CPlusLargeMotor, name='motor_B') class Train(CPlusHub): async def run(self): await self.motor_A.set_speed(+100) await sleep(2) async def move_forward(self): await self.motor_A.set_speed(-100) await self.motor_B.set_speed(-100) await sleep(2) async def system(): train = Train('My train') async def main(): start(system) async def move(): train = Train('My train') await train.move_forward()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I want to use this library in a special way, i need your help (i use the control+ hub)
my main file is (main.py):
The second file is train.py
The text was updated successfully, but these errors were encountered: