TimedAction Library error message

Hello again,

I have downloaded the TimedAction Library (found here) and have come across some errors that I seem to be having trouble understanding.

The code that I am using is the following:

#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
#define ledPin 13
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);
}

The first error that I get is:

Arduino: 1.8.1 (Windows 10), Board: “Arduino/Genuino Uno”

In file included from C:\Users\ggalatis\Documents\Arduino\timedAction_test\timedAction_test.ino:1:0:

C:\Program Files (x86)\Arduino\libraries\TimedAction/TimedAction.h:33:22: fatal error: WProgram.h: No such file or directory

#include “WProgram.h”

^

compilation terminated.

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

I looked up how this error can be fixed, and found that if the WProgram.h was replaced with Arduino.h in the H file then it will be fixed. When I did this the following error came up:

Arduino: 1.8.1 (Windows 10), Board: “Arduino/Genuino Uno”

timedAction_test:5: error: ‘blink’ was not declared in this scope

TimedAction timedAction = TimedAction(1000,blink);

^

exit status 1
‘blink’ was not declared in this scope

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.

A similar question has been asked here but nothing concrete has been answered. Any insight will be apreciated,

Cheers

When I compile the code you posted, using 1.0.5, I get:

Binary sketch size: 1,096 bytes (of a 30,720 byte maximum)

Using 1.6.5, I get:

Sketch uses 1,084 bytes (3%) of program storage space. Maximum is 30,720 bytes. Global variables use 21 bytes (1%) of dynamic memory, leaving 2,027 bytes for local variables. Maximum is 2,048 bytes.

Newer is not always better.