Polytechnic • Embedded Systems

Blink & Sense

Keep an LED blinking while your controller watches a sensor.

Round 1/6Score: 0

Microcontroller simulator

Arduino-style C++ sketch

Timing idea

delay() Waiting Sense millis() Repeated quick sensor checks

Ideal timing model; no switch bounce, electrical noise or hardware scheduling overhead.

Configure the loop

Timing method
Blink period—
Sensor response—

Live plot

The idea

The loop() function repeats for as long as the board runs. delay() prevents other code from executing while waiting. millis() allows the programme to check the clock and sensor repeatedly without blocking.

Controller calibrated!