Pages: [1]   Go Down
Author Topic: Arduino Scheduler not working  (Read 1339 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

hi all, i am trying to use time scheduler but i have a problem, with that ,
i toke this code from  here
and i downloaded the Scheduler.h but still it dosnot compile  smiley-cry

so dose any one can provide any help ?

code :

#include <Scheduler.h> // [url=][/url]

Scheduler scheduler = Scheduler();      //create a scheduler

const byte ledPin = 13;               //LED on pin 13

void setup(){
  Serial.begin(9600);                 //Iitialize the UART
  pinMode(ledPin,OUTPUT);             //set pin 13 to OUTPUT

void loop(){
  scheduler.update();                 //update the scheduler, maybe it is time to execute a function?

  if (Serial.available()){            //if we have recieved anything on the Serial
    scheduler.schedule(setHigh,500);  //schedule a setHigh call in 500 milliseconds
    Serial.flush();                   //flush Serial so we do not schedule multiple setHigh calls

void setHigh(){
  digitalWrite(ledPin,HIGH);          //set ledPin HIGH
  scheduler.schedule(setLow,500);     //schedule setLow to execute in 500 milliseconds

void setLow(){
  digitalWrite(ledPin,LOW);           //set ledPin LOW

Massachusetts, USA
Offline Offline
Tesla Member
Karma: 212
Posts: 8952
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

it dosnot compile  smiley-cry

Can you be more specific?

Did you put Scheduler.cpp and Scheduler.h in libraries/Scheduler?

Did you re-start the IDE after installing the library?

Note: Scheduler.h has not been updated for Arduino 1.0.  Change "Wprogram.h" to "Arduino.h".
« Last Edit: May 08, 2013, 09:20:04 am by johnwasser » Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Pages: [1]   Go Up
Jump to: