Skip to content

Commit 178e239

Browse files
committed
tested change direction
1 parent f890876 commit 178e239

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/change_direction/change_direction.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ void loop() {
7979
// change direction each 1000 loop passes
8080
target_velocity *= (t >= 1000) ? -1 : 1;
8181
// loop passes counter
82-
t = (t > 1000) ? t+1 : 0;
82+
t = (t >= 1000) ? 0 : t+1;
8383

8484

8585
// iterative function setting the outter loop target
@@ -91,7 +91,7 @@ void loop() {
9191

9292
// function intended to be used with serial plotter to monitor motor variables
9393
// significantly slowing the execution down!!!!
94-
motor_monitor();
94+
//motor_monitor();
9595
}
9696

9797
// utility function intended to be used with serial plotter to monitor motor variables

0 commit comments

Comments
 (0)