Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 2a1bf63

Browse files
Stop all motor movement when timing out
1 parent ff4ba0d commit 2a1bf63

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

arduino_controller/arduino_controller_functions.ino

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,13 @@ void ProcessData()
109109
if (timeout_counter >= TIMEOUT)
110110
{
111111
go = false;
112+
for (int i = 0; i < NUMBER_MOTORS; i++)
113+
{
114+
my_servo[i].write(90);
115+
}
112116
}
113117
timeout_counter = timeout_counter + 1
114118

115-
116119
}
117120
}
118121
else
@@ -145,6 +148,10 @@ void ProcessData()
145148
if (timeout_counter >= TIMEOUT)
146149
{
147150
go = false;
151+
for (int i = 0; i < NUMBER_MOTORS; i++)
152+
{
153+
my_servo[i].write(90);
154+
}
148155
}
149156
timeout_counter = timeout_counter + 1
150157
}

0 commit comments

Comments
 (0)