Advertisement
Krzyspx

Untitled

Mar 13th, 2019
502
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. // TEST ports pins ESP8266 ROW-01 ZAMEL
  2. #define BLYNK_PRINT Serial
  3. #include <ESP8266WiFi.h>
  4. #include <BlynkSimpleEsp8266.h>
  5.  
  6. char auth[] = "fc151414655b4431bff63xxxxxxxxxxxxxxx";
  7. char ssid[] = "xxxxxxxx";
  8. char pass[] = "xxxxxxxxx";
  9.  
  10. #include <Timers.h> //  my favorite timer
  11. Timers <7> akcja; //
  12.  
  13. WidgetLED led1(V0);
  14.  
  15. void setup()
  16. {
  17.     akcja.attach(0, 1000, vLED_timer); //
  18.    Serial.begin(115200);  delay(100);
  19.   Blynk.begin(auth, ssid, pass);
  20. }
  21.  
  22. void loop()
  23. {
  24.    akcja.process(); // timer
  25.   Blynk.run();
  26. }
  27.  
  28. int wskrunAr = 0;
  29. void vLED_timer()//miganie vLED dla kontroli połączenia
  30. {
  31.   wskrunAr = !wskrunAr ;
  32.   if (wskrunAr == 0)led1.off(); else led1.on();
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement