Part 29 — Analog Step
Imagine you have a series of lighting levels (e.g., dim, medium, bright, very bright), and you want to cycle through them using a button press.
Setup:
- Define the lighting levels as values (
value1
,value2
, etc.). For example: value1
= 25% (dim)value2
= 50% (medium)value3
= 75% (bright)value4
= 100% (very bright)
Operation:
- Each time the user presses the button connected to the
step
input, the lighting level will advance through the predefined values (25%, 50%, 75%, and 100%). When it reaches the last value (100%), the next button press resets it back to 25%.