Advertisement
KRITSADA

project1 iot

Jun 5th, 2019
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | None | 0 0
  1. #define BLYNK_PRINT Serial
  2. #include <ESP8266WiFi.h>
  3. #include <BlynkSimpleEsp8266.h>
  4. #include "AXWIFI.h"
  5. char ssid[] = "RPI";
  6. char pass[] = "123456789-0";
  7. char auth[] = "a124a0c1fdb54c9fa3cb772cfdbeb794";
  8. BlynkTimer timer;
  9. void setup() {
  10.   Serial.begin(15200);
  11.   Blynk.begin(auth, ssid, pass);
  12.   ax.begin();
  13.   pinMode(D7,INPUT);
  14.   timer.setInterval(1000L,my_loop);
  15. }
  16. int pinV0,pinV1,pinV2;
  17. BLYNK_WRITE(V0){pinV0 = param.asInt();}
  18. BLYNK_WRITE(V1){pinV1 = param.asInt();}
  19. BLYNK_WRITE(V2){pinV2 = param.asInt();}
  20. void my_loop(){
  21.    ax.SledShow(0,pinV0,pinV1,pinV2);
  22. }
  23. void loop() {
  24.   Blynk.run();
  25.   timer.run();
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement