Is there a list of Blynk commands somewhere with examples of usage / syntax?
If I have trouble linking a library, can I just open the library, copy all the code, and paste it into my sketch?
What do you mean? Did you try using example sketches in the Arduino IDE?
I had installed the library in the library folder and had included the "#include <SimpleTimer.h> line in the sketch itself, but forgot to click on “Include Library” under the Sketch which I guess you have to do. So I got it to include the library. Now, when the compiler encounters this line “timer.setInterval(5000L,check);”, it aborts with the error “‘check’ was not declared in this scope”. I copied several examples. See code below. Thanks again everyone.
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SimpleTimer.h>
#include <Time.h>
char auth[] = "XXXXXXXXXXXX";
#define BLYNK_PRINT Serial
#define WIFI_SSID "XXXXxxxxxx6"
#define WIFI_PASS "XXxxxx"
#define ESP8266_LED 5
SimpleTimer timer;
void setup()
{
pinMode(0, INPUT);
pinMode(ESP8266_LED, OUTPUT);
Serial.begin(9600);
Blynk.begin(auth, WIFI_SSID, WIFI_PASS);
timer.setInterval(5000L,check);
}
void check()
{
int wash = !digitalRead(0);
if (wash == HIGH) {
Blynk.virtualWrite(V2, HIGH);
digitalWrite(5, HIGH);
Blynk.notify("Done");}
else {
Blynk.virtualWrite(V2, LOW);
digitalWrite(5, LOW);
}
}
void loop()
{
Blynk.run();
timer.run();
}
[quote=“MJC57, post:5, topic:3929”]S
void setup()
{
[/quote]
I think I figured this one out. You have to have the check function ahead of the setup function. I did that and it compiled. It wasn’t done that way in the examples I looked at so I didn’t think it mattered.
Yes. I realized as soon as I hit reply that I forgot to obscure it. Thanks.
Where can I find all the variations and options of blynk commands … blynk.run, blynk.connect, blynk. setProperty, blynk.syncAll, blynk.virtualWrite, blynk dot etc etc …the docs.blynk.cc only lists a few?
If you need ALL of them, the good source of information is the source code: https://github.com/blynkkk/blynk-library