Skip to content

Instantly share code, notes, and snippets.

@scottnuma
Created March 9, 2018 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottnuma/ae64850b4d5fc5e8047996cff71a32c1 to your computer and use it in GitHub Desktop.
Save scottnuma/ae64850b4d5fc5e8047996cff71a32c1 to your computer and use it in GitHub Desktop.
Code to test robot hardware.
"""Code to just run the motors.
This code requires no gamepad and will only attempt to make the
motors spin. Useful for debugging hardware issues on robots.
"""
# Update motor values below
left_motor = ""
right_motor = ""
def autonomous_setup():
print("Autonomous mode has started!")
def autonomous_main():
pass
def teleop_setup():
print("Tele-operated mode has started!")
def teleop_main():
Robot.set_value(left_motor, "duty_cycle", 1)
Robot.set_value(right_motor, "duty_cycle", 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment