Skip to content

stejsoftware/Arduino-Timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();
}

About

Simple software timer for the Arduino

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages