repository to manage all files related to the makeathon farm bot project (Software + Documentation).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

plant_5.py 517B

12345678910111213141516
  1. #!/usr/bin/env pybricks-micropython
  2. from ev3dev2.motor import Motor, LargeMotor, ServoMotor, OUTPUT_A, OUTPUT_B, OUTPUT_C, OUTPUT_D, SpeedPercent
  3. motorRight = LargeMotor(OUTPUT_A)
  4. motorLeft = LargeMotor(OUTPUT_D)
  5. motorUpDown = Motor(OUTPUT_C)
  6. motorLeftRight = Motor(OUTPUT_B)
  7. motorRight.on_for_seconds(SpeedPercent(70), seconds=2.7, block=False)
  8. motorLeft.on_for_seconds(SpeedPercent(70), seconds=2.7)
  9. motorLeftRight.on_for_degrees(SpeedPercent(50), 400)
  10. motorUpDown.on_for_seconds(SpeedPercent(50), seconds=3)