I'm not sure if I'm being really really stupid, but why doesn't this work?
void setup() {
Serial.begin(9600);
}
void loop() {
for (int x; x < 8; x++) {
for (int y; y < 8; y++) {
Serial.print(x);
Serial.println(y);
delay(100);
}
}
}
When this does:
void setup() {
Serial.begin(9600);
}
void loop() {
for (int x; x < 8; x++) {
Serial.println(x);
delay(100);
}
}
The first produces no output over Serial, whereas the second one prints out the numbers 0 to 7 as expected. I'm using a Teensy 3.1.
int x = 0;
insidefor()
statements (same fory
by the way)... – jfpoilpret Aug 10 '14 at 15:32