Mastodon
Guest

ESP8266 Wi-Fi Module to Control LED using Blynk App

Nov 27th, 2025
33
0
Never
Not a member of gistpad yet? Sign Up, it unlocks many cool features!
C++ 2.98 KB | Source Code | 0 0
  1. #include<ESP8266HTTPClient.h>
  2. #include<ESP8266WiFi.h>
  3. #define BLYNK_TEMPLATE_ID "TMPL3f6l9xU6t"
  4. #define BLYNK_TEMPLATE_NAME "CONTROL LED 1"
  5. #define BLYNK_AUTH_TOKEN "NdNGErdPVS2TcadGbrURXR1F7kx1o8R4"
  6. #define BLYNK_PRINT Serial
  7. #include <BlynkSimpleEsp8266.h>
  8. char auth [] = BLYNK_AUTH_TOKEN;
  9. char ssid [] = "hotspot user"; // Enter your Wi-Fi Username
  10. char pass[] = "hotspot password"; // Enter your Wi-Fi password
  11. int ledpin = D4;
  12. void setup()
  13. {
  14. Serial.begin(115200);
  15. Blynk.begin(auth, ssid, pass);
  16. pinMode(ledpin, OUTPUT);
  17. }
  18. void loop()
  19. {Blynk.run();
  20. }
RAW Gist Data Copied