Skip to content

Commit 26c5e76

Browse files
committed
initialize coutner variable 'x' in cheese loop
Fixing a bug where no cheeses were dispensed :(
1 parent 589da6f commit 26c5e76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/CoreTesting/examples/example2_serial/example2_serial.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void loop() {
3737
unsigned int cheeseCount = Serial.parseInt(); //That's a lot of potential cheese
3838

3939
//Print to second serial port
40-
for (unsigned int x ; x < cheeseCount ; x++)
40+
for (unsigned int x = 0; x < cheeseCount ; x++)
4141
{
4242
Serial1.println("Cheese!");
4343
}

0 commit comments

Comments
 (0)