Libraries \ TimedAction

Reference for Wiring version 1.0 Build 0100+ If you have a previous version, use the reference included with your software. If see any errors or have any comments, let us know.

Class

TimedAction

Name

check()

Examples
#include <TimedAction.h>

//this initializes a TimedAction class that will 
//change the state of an LED every second.
TimedAction timedAction = TimedAction(1000,blink);

//pin / state variables
const byte ledPin = WLED;
boolean ledState = false;

void setup()
{
  pinMode(ledPin,OUTPUT);
  digitalWrite(ledPin,ledState);
}

void loop()
{
  timedAction.check();
  //you can add you code here, it will run 'parallel' to the blink
}

void blink()
{
  ledState ? ledState=false : ledState=true;
  digitalWrite(ledPin,ledState);
}
Description Check if it is time for this TimedAction to call the function.
Syntax
check()
Returns None
Usage Application
Updated on July 07, 2011 11:11:59pm PDT

Creative Commons License