ZulRocky

Untitled

Jun 22nd, 2020
7,506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #include <BlynkSimpleStream.h>
  2.  
  3. // You should get Auth Token in the Blynk App.
  4. // Go to the Project Settings (nut icon).
  5. char auth[] = "3NyiiB8i6r6EWvRfuS43nSb8NGexA9KH";
  6.  
  7. void setup()
  8. {
  9. Serial.begin(9600);
  10. Blynk.begin(auth, Serial);
  11. pinMode(11, OUTPUT);
  12. pinMode(12, OUTPUT);
  13. pinMode(13, OUTPUT);
  14. }
  15.  
  16. BLYNK_WRITE(V1) //Button Widget is writing to pin V1
  17. {
  18. int pinData = param.asInt();
  19. if(pinData==1){
  20. digitalWrite(11, HIGH);
  21. }else{
  22. digitalWrite(11, LOW);
  23. }
  24. }
  25.  
  26. void loop()
  27. {
  28. Blynk.run();
  29. }
Add Comment
Please, Sign In to add comment