hello am using photon and I cant get the LED example to blink my LED in the APP
whats wrong with me code ?
// This #include statement was automatically added by the Particle IDE.
#include "SparkCorePolledTimer/SparkCorePolledTimer.h"
// This #include statement was automatically added by the Particle IDE.
#include "blynk/blynk.h"
/**************************************************************
* Blynk is a platform with iOS and Android apps to control
* Arduino, Raspberry Pi and the likes over the Internet.
* You can easily build graphic interfaces for all your
* projects by simply dragging and dropping widgets.
*
* Downloads, docs, tutorials: http://www.blynk.cc
* Blynk community: http://community.blynk.cc
* Social networks: http://www.fb.com/blynkapp
* http://twitter.com/blynk_app
*
* Blynk library is licensed under MIT license
* This example code is in public domain.
*
**************************************************************
* Blynk using a LED widget on your phone!
*
* App project setup:
* LED widget on V1
*
* WARNING :
* For this example you'll need SimpleTimer library:
* https://github.com/jfturcot/SimpleTimer
* Visit this page for more information:
* http://playground.arduino.cc/Code/SimpleTimer
*
**************************************************************/
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "af4a41b131974d91bbaac4d7a3709d4c";
WidgetLED led1(V1);
void setup()
{
Serial.begin(9600); // See the connection status in Serial Monitor
Blynk.begin(auth);
while (Blynk.connect() == false) {
// Wait until connected
}
}
// V1 LED Widget is blinking
void blinkLedWidget()
{
if (led1.getValue()) {
led1.off();
Serial.println("LED on V1: off");
} else {
led1.on();
Serial.println("LED on V1: on");
}
}
void loop()
{
Blynk.run();
}
// This #include statement was automatically added by the Particle IDE.
#include "SparkCorePolledTimer/SparkCorePolledTimer.h"
// This #include statement was automatically added by the Particle IDE.
#include "blynk/blynk.h"
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <SimpleTimer.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "af4a41b131974d91bbaac4d7a3709d4c";
WidgetLED led1(V1);
SimpleTimer timer;
void setup()
{
Serial.begin(9600); // See the connection status in Serial Monitor
Blynk.begin(auth);
while (Blynk.connect() == false) {
// Wait until connected
}
timer.setInterval(1000L, blinkLedWidget);
}
// V1 LED Widget is blinking
void blinkLedWidget()
{
if (led1.getValue()) {
led1.off();
Serial.println("LED on V1: off");
} else {
led1.on();
Serial.println("LED on V1: on");
}
}
void loop()
{
Blynk.run();
timer.run();
}
i do go to build ide then librares then in search i type blynk included to the code then i search for sparkcorepulledtimer and i included to the code .but wen i compile it i wont it gives me this error
In file included from blynk/BlynkParticle.h:16:0,
from blynk/BlynkSimpleParticle.h:14,
from blynk/blynk.h:2,
from vp.cpp:5:
blynk/BlynkApiParticle.h:87:6: warning: #warning "analogInputToDigitalPin not defined => Named analog pins will not work" [-Wcpp]
#warning "analogInputToDigitalPin not defined => Named analog pins will not work"
^
vp.cpp:14:25: fatal error: SimpleTimer.h: No such file or directory
//#include "SparkCorePolledTimer/SparkCorePolledTimer.h"
^
compilation terminated.
make[1]: *** [../build/target/user/platform-6vp.o] Error 1
make: *** [user] Error 2
how i can include simpletimer ?? plz show me how thank u sir