1 #ifndef _PIN_FLASHER_H_
2 #define _PIN_FLASHER_H_
113 unsigned long half_period;
const int PIN_ON
Flashes the io_pin.
const int PIN_OFF
PIN_OFF is a 'magic' number that turns the output OFF when setOnOff(PIN_ON) called.
The PinFlasher class inherits from millisDelay to provide non-blocking repeating on/off toggle of the...
virtual void setOutput()
set the output based on io_pin, io_pin_on and outputInverted
PinFlasher(int pin=-1, bool invert=false)
Constructor.
bool invertOutput()
Normally pin output is LOW for off, HIGH for on.
void setPin(int pin)
Set the output pin to flash.
void update()
check if output should be changed.
void setOnOff(unsigned long onOff_ms)
Set the On and Off length, the period is twice this setting.
millisDelay** implements a non-blocking, repeatable delay, see the detailed description.