diff --git a/XRPLib/resetbot.py b/XRPLib/resetbot.py index 7e423da..d5b4af8 100644 --- a/XRPLib/resetbot.py +++ b/XRPLib/resetbot.py @@ -1,5 +1,7 @@ from XRPLib.encoded_motor import EncodedMotor from XRPLib.imu import IMU +from XRPLib.board import Board +from XRPLib.servo import Servo """ A simple file for shutting off all of the motors after a program gets interrupted from the REPL. Run this file after interrupting a program to stop the robot by running "import XRPLib.resetbot" in the REPL. @@ -11,4 +13,12 @@ motor.set_effort(0) motor.reset_encoder_position() -IMU.get_default_imu().reset() \ No newline at end of file +# Reset IMU registers +IMU.get_default_imu().reset() + +# Turn off the on-board LED +Board.get_default_board().led_off() + +# Turn off both Servos +Servo.get_default_servo().free() +Servo(17).free() \ No newline at end of file