35 unsigned long onTime()
const {
return _onTime; }
36 unsigned long offTime()
const {
return _offTime; }
37 void setBlinkRate(
unsigned long onTime,
unsigned long offTime);
39 bool state()
const {
return _state; }
42 void pause() { _paused =
true; }
50 unsigned long _onTime;
51 unsigned long _offTime;
52 unsigned long _lastChange;
void resume()
Resumes the LED blink cycle after a pause().
unsigned long offTime() const
Returns the number of milliseconds the LED will be off.
void pause()
Pauses the LED blink cycle in its current state().
void setState(bool state)
Sets the current state of the LED, where true is on, false is off.
void setBlinkRate(unsigned long onTime, unsigned long offTime)
Sets the onTime and offTime (in milliseconds).
Blink a LED on a digital output pin.
bool state() const
Returns the current state of the LED; true is on, false is off.
unsigned long onTime() const
Returns the number of milliseconds the LED will be on.
BlinkLED(uint8_t pin, unsigned long onTime, unsigned long offTime, bool initialState=false)
Initialize a blinking LED on the specified pin.
bool isPaused() const
Returns true if the LED blink cycle is paused; false otherwise.