Advertisement
Guest User

Untitled

a guest
Oct 27th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. #define BLYNK_PRINT Serial
  2. #include <ESP8266WiFi.h>
  3. #include <BlynkSimpleEsp8266.h>
  4.  
  5. #include <SimpleTimer.h>
  6. #include <SimpleSuperTimer.h>
  7.  
  8. SimpleTimer timer;
  9.  
  10. SimpleSuperTimer stimer;
  11.  
  12.  
  13. // Jakub Vyhnalek, 2016
  14. // TEST --- codding playground
  15.  
  16.  
  17. char auth[] = "08c93a0c521e403d970a08f18bd2ef15";
  18. //char auth[] = "ee2ef29f08ed43d2b6ec31aef35513e4";
  19. char ssid[] = "Dafi";
  20. char pass[] = "Libeznice";
  21. char server[] = "dawon.cz";
  22. int SliderValue;
  23. bool BoolValue[8];
  24.  
  25. WidgetLED testLED(V0);
  26.  
  27. BLYNK_WRITE(1)
  28. {
  29. int i=param.asInt();
  30. if (i==1)
  31. {
  32. testLED.on();
  33. }
  34. else
  35. {
  36. testLED.off();
  37. }
  38. }
  39.  
  40.  
  41. void setup()
  42. {
  43. Serial.begin(9600);
  44. Blynk.begin(auth, ssid, pass, server);
  45.  
  46. stimer.setInterval(750L, CoreValue, 24);
  47. pinMode(5, OUTPUT);
  48. timer.setInterval(500L, knedlik);
  49.  
  50. }
  51.  
  52. void CoreValue(int par)
  53. {
  54. Serial.println(par);
  55.  
  56. }
  57.  
  58. void knedlik()
  59. {
  60. Serial.println("test");
  61. }
  62.  
  63. void loop()
  64. {
  65. Blynk.run();
  66. timer.run();
  67. stimer.run();
  68. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement