step()

The step() function does precisely what its name suggests, and performs one processing step that loops indefinitely as fast as possible, allowing your program to change and respond. Use it to actively control the board.

Hint

Function step() is the Plaquette equivalent of Arduino’s loop().

Important

It is highly recommended that this function executes as fast as possible. Hence, one should performing computationally-intensive processing or calling blocking functions such as delay()

Tip

In Plaquette, function step() is optional: only declare it if you need it… (you will, most of the time!)

Example

#include <Plaquette.h>

DigitalIn button(2);

DigitalOut led(13);

void step() {
  button >> led;
}

See Also