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.
Name |
TimedAction |
Examples |
#include <TimedAction.h>
TimedAction timedAction = TimedAction(1000,blink);
const byte ledPin = WLED;
boolean ledState = false;
void setup()
{
pinMode(ledPin,OUTPUT);
digitalWrite(ledPin,ledState);
}
void loop()
{
timedAction.check();
}
void blink()
{
ledState ? ledState=false : ledState=true;
digitalWrite(ledPin,ledState);
}
|
Description |
Initialize the TimedAction object and activate it. |
Syntax |
TimedAction( interval, function )
TimedAction( prev, interval, function)
|
Methods |
|
Parameters |
prev |
The wait time, before starting the interval. |
interval |
The interval to call the function. |
function |
the funtion to call each interval. |
|
Returns |
None |
Usage |
Application |
Updated on July 07, 2011 11:11:58pm PDT