Skip to content

Latest commit

 

History

History
33 lines (28 loc) · 608 Bytes

README.md

File metadata and controls

33 lines (28 loc) · 608 Bytes

Arduino-Timer Build Status

Simple software timer for the Arduino

Installation

https://www.arduino.cc/en/Guide/Libraries

Usage

void blinker()
{
  if( digitalRead(PIN) == HIGH )
  {
    digitalWrite(PIN, LOW);
  }
  else
  {
    digitalWrite(PIN, HIGH);    
  }
}
  
void setup() 
{
  // creates a Timer that will execute once a second
  Timer.repeat(blinker, 1000);
}

void loop() 
{
  // checks the timer and runs the handlers of expired timers.
  Timer.run();
}