int counter = 1;
void setup() {
Serial.begin(9600);
}
void loop() {
// Use an if statement and modulo to determine if
// our number is a multiple of 3
if ( (counter % 3) == 0 ) {
Serial.println("Fizz");
} else {
Serial.println(counter);
}
// Increment our counter and wait
counter = counter + 1;
delay(500);
}
Simulator: https://tinkercad.com/things/1qho5tgaRMD