void setup()
{
// put your setup code here, to run once:
Serial.begin(115200);
while (!Serial)
{
; // Wait for serial to connect
}
delay(1000);
Serial.println("setup()");
}
void loop()
{
static uint32_t i = 0 ;
Serial.print("loop()"); // should start at 0
Serial.println( i++ ) ;
delay( 1000) ;
}
Serial monitor:
loop()1
loop()2
loop()3
loop()4
loop()5
loop()6
loop()7
loop()8