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

Commit a014d20

Browse files
Updated Comments in functions.ino
1 parent a7a08de commit a014d20

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

arduino_controller/functions.ino

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,27 @@ void ProcessData()
2222
{
2323
if (motor_commands[i][0] == 0)
2424
{
25+
// Move up
2526
my_servo[i].write(80);
26-
Serial.println("Reached Up");
2727
is_reset = false;
2828
}
2929
else if (motor_commands[i][0] == 1)
3030
{
31+
// Move down
3132
my_servo[i].write(100);
32-
Serial.println("Reached Down");
3333
is_reset = false;
3434
}
3535
else if (motor_commands[i][0] == 2)
3636
{
37+
// Don't Move
3738
my_servo[i].write(90);
38-
Serial.println("Reached Stopped");
3939
is_reset = false;
4040
}
4141
else if (motor_commands[i][0] == 3)
4242
{
43-
// Start moving pieces up
43+
// Move Up for Reset
4444
my_servo[i].write(80);
45-
Serial.println("Reached Reset");
4645
is_reset = true;
47-
// call reset function (still needs to be written)
4846
}
4947
else
5048
{
@@ -123,7 +121,8 @@ void ProcessData()
123121
{
124122
int reset_counter[NUMBER_MOTORS] = {0};
125123

126-
for (int i = 0; i < NUMBER_MOTORS; ++i) {
124+
for (int i = 0; i < NUMBER_MOTORS; ++i)
125+
{
127126
reset_counter[i] = 1;
128127
}
129128

@@ -186,6 +185,8 @@ void PopulateArray()
186185
// string
187186
for (int i = 0; i < NUMBER_MOTORS; i++)
188187
{
188+
189+
// we break everything in to pairs of values
189190
int search1 = (i * 2);
190191
int search2 = ((i * 2) + 1);
191192

@@ -218,15 +219,15 @@ void PopulateArray()
218219
}
219220

220221
// print array
221-
for (int i = 0; i < NUMBER_MOTORS; i++)
222-
{
223-
Serial.print("Motor Number: ");
224-
Serial.print(i);
225-
Serial.print(" - Direction: ");
226-
Serial.print(motor_commands[i][0]);
227-
Serial.print(" - Rotations: ");
228-
Serial.println(motor_commands[i][1]);
229-
}
222+
//for (int i = 0; i < NUMBER_MOTORS; i++)
223+
//{
224+
// Serial.print("Motor Number: ");
225+
// Serial.print(i);
226+
// Serial.print(" - Direction: ");
227+
// Serial.print(motor_commands[i][0]);
228+
// Serial.print(" - Rotations: ");
229+
// Serial.println(motor_commands[i][1]);
230+
//}
230231
}
231232

232233
//////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)