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.

main.py 365B

1234567891011121314
  1. # Import the necessary modules from the ev3dev2 library
  2. from ev3dev2.motor import LargeMotor, OUTPUT_A, OUTPUT_D
  3. from time import sleep
  4. # Connect the motors to the EV3 brick
  5. motor_left = LargeMotor(OUTPUT_A)
  6. motor_right = LargeMotor(OUTPUT_D)
  7. # Move the robot forward for 5 seconds
  8. motor_left.on(50)
  9. motor_right.on(50)
  10. sleep(5)
  11. motor_left.off()
  12. motor_right.off()