#include <Plaquette.h>
int goodCounter = 0;
int betterCounter = 0;
int bestCounter = 0;
Metronome myMetro(1.0); // tick once a second
DigitalOut led(11);
Monitor monitor(9600);
void step() {
if(myMetro) {
goodCounter = goodCounter + 1; // ok this is fine
betterCounter++; // increment the value by 1
bestCounter += 1; // if you want to increment by any other value than 1, just replace with another number. More flexible than ++
println(goodCounter);
}
if (goodCounter >= 4) {
led.on();
if (goodCounter == 15) {
goodCounter = 0;
}
}
else led.off();
//goodCounter %= 4; // goodCounter is always limited to whatever remains after it’s divided by 4.
}