From a3c08ee25e5e07dfd48cc28d9982b82eef16a893 Mon Sep 17 00:00:00 2001 From: SuragNuthulapaty <77648585+SuragNuthulapaty@users.noreply.github.com> Date: Sat, 24 Feb 2024 11:53:42 -0600 Subject: [PATCH] square --- code/moving_test.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/code/moving_test.py b/code/moving_test.py index cbcf1f6..5c5c827 100644 --- a/code/moving_test.py +++ b/code/moving_test.py @@ -39,11 +39,12 @@ right_motor.stop() time.sleep(dt) - motor_rotations.move_forward(left_motor, right_motor, 2) - motor_rotations.rotate_cw_90_deg(left_motor, right_motor) - motor_rotations.move_forward(left_motor, right_motor, 2) - motor_rotations.rotate_ccw_90_deg(left_motor, right_motor) - motor_rotations.rotate_ccw_90_deg(left_motor, right_motor) - motor_rotations.move_forward(left_motor, right_motor, 2) - motor_rotations.rotate_ccw_90_deg(left_motor, right_motor) - motor_rotations.move_forward(left_motor, right_motor, 2) \ No newline at end of file + for _ in range(8): + motor_rotations.move_forward(left_motor, right_motor, 2) + motor_rotations.rotate_cw_90_deg(left_motor, right_motor) + # motor_rotations.move_forward(left_motor, right_motor, 2) + # motor_rotations.rotate_ccw_90_deg(left_motor, right_motor) + # motor_rotations.rotate_ccw_90_deg(left_motor, right_motor) + # motor_rotations.move_forward(left_motor, right_motor, 2) + # motor_rotations.rotate_ccw_90_deg(left_motor, right_motor) + # motor_rotations.move_forward(left_motor, right_motor, 2) \ No newline at end of file