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_6.py 641B

12345678910111213141516171819202122
  1. #!/usr/bin/env pybricks-micropython
  2. """
  3. created by waldhauser
  4. This file contians the programm to drive a specfic plant with a certain distance to drive
  5. """
  6. from ev3dev2.motor import Motor, LargeMotor, ServoMotor, OUTPUT_A, OUTPUT_B, OUTPUT_C, OUTPUT_D, SpeedPercent
  7. motorRight = LargeMotor(OUTPUT_A)
  8. motorLeft = LargeMotor(OUTPUT_D)
  9. motorUpDown = Motor(OUTPUT_C)
  10. motorLeftRight = Motor(OUTPUT_B)
  11. motorRight.on_for_seconds(SpeedPercent(70), seconds=2.7, block=False)
  12. motorLeft.on_for_seconds(SpeedPercent(70), seconds=2.7)
  13. motorLeftRight.on_for_degrees(SpeedPercent(-50), 400)
  14. motorUpDown.on_for_seconds(SpeedPercent(50), seconds=3)