Scenario

Below is an example of a scenario. These lines have to be placed somewhere in your sketch.

// SCENDIGPIN 10 1 0

// SCENDIGPIN 10 50 1

// SCENDIGPIN 10 100 0

// SCENDIGPIN 10 200 1

// SCENDIGPIN 9 1 0

// SCENDIGPIN 9 40 1

// SCENDIGPIN 9 130 0

//

// SCENANAPIN 4 1 5

// SCENANAPIN 5 1 8

// SCENANAPIN 4 80 12

// SCENANAPIN 5 120 18

Any digitalRead/analogRead or interrupts are based on the above lines.

SCENDIGPIN x y z where x=pin, y=step, z=value.

For instance, a digitalRead(10) at step 34 gives the value 0. At step 53, the same read gives value 1.