/*
Stone Code Soup
- a colaborative coding exercise.
Forum: https://forum.arduino.cc/t/stone-code-soup/1449685
Date 2026/06/27 Version 0.001 Wokwi: https://wokwi.com/projects/467924869647107073
1. Copy the code from the most recent post.
2. Add to the code anything that Wokwi allows with a free account.
3. Format the code (IDE or Wokwi style).
4. In the new post...
a. Post the new code using a <CODE> block.
b. Post the new diagram.json using <detail> (see below)
c. Post a Wokwi screen shot.
<details><summary>diagram.json</summary>
// (linefeed)
''' // (three back-ticks)
// (linefeed)
diagram.json code
// (linefeed)
''' // (three back-ticks)
// (linefeed)
</details>
// (linefeed)
*/
constexpr unsigned long interval {1000}; // every interval milliseconds
unsigned long lastTime = 0; // last event time
unsigned long counter = 0; // count the events
void setup() {
Serial.begin(115200); // start serial comms
Serial.println(F("Hello, World!")); // print to serial monitor
}
void loop() {
if (millis() - lastTime >= interval) {
lastTime = millis();
counter++; // Will rollover after 4294967295 seconds (or about 136 years and 35 days )
Serial.print(F("Action #"));
Serial.println(counter);
}
}