#include <Plaquette.h>
//The LED is lit by a ramp, which increases in duration each time that a loop passes
// The LED.
AnalogOut led(9);
// The timer.
Ramp timer;
// This function restarts the timer with a random duration.
void restartTimer() {
timer.duration( timer.duration() + 1 );
timer.start();
}
void begin() {
restartTimer();
}
void step() {
// Send timer progress from 0.1 to LED value.
timer >> led;
// If timer has run its course, restart it.
if (timer.isFinished())
restartTimer();
}