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 560B

123456789101112131415161718192021
  1. from pybricks.hubs import EV3Brick
  2. from pybricks.ev3devices import Motor
  3. from pybricks.parameters import Port
  4. #from ev3dev2.motor import LargeMotor, OUTPUT_A, OUTPUT_B, SpeedPercent, MoveTank
  5. # Initialize the EV3 brick.
  6. ev3 = EV3Brick()
  7. # Initialize a motor at port B.
  8. test_motor = Motor(Port.B)
  9. #test = ev3dev2.motor.LargeMotor('/dev/ttyAMA0')
  10. #test.on(500)
  11. # Run the motor up to 500 degrees per second, for 2 seconds.
  12. test_motor.run_time(500, 2000)
  13. # Stop the motor.
  14. test_motor.stop()
  15. # Beep to indicate that the program has finished.
  16. ev3.speaker.beep()