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 scopeThis 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