Advertisement
pleasedontcode

**Wi-Fi Blynk** rev_03

Feb 10th, 2025
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /********* Pleasedontcode.com **********
  2.  
  3.     Pleasedontcode thanks you for automatic code generation! Enjoy your code!
  4.  
  5.     - Terms and Conditions:
  6.     You have a non-exclusive, revocable, worldwide, royalty-free license
  7.     for personal and commercial use. Attribution is optional; modifications
  8.     are allowed, but you're responsible for code maintenance. We're not
  9.     liable for any loss or damage. For full terms,
  10.     please visit pleasedontcode.com/termsandconditions.
  11.  
  12.     - Project: **Wi-Fi Blynk**
  13.     - Source Code NOT compiled for: Arduino Uno
  14.     - Source Code created on: 2025-02-10 20:18:53
  15.  
  16. ********* Pleasedontcode.com **********/
  17.  
  18. /****** SYSTEM REQUIREMENTS *****/
  19. /****** SYSTEM REQUIREMENT 1 *****/
  20.     /* blynk code */
  21. /****** END SYSTEM REQUIREMENTS *****/
  22.  
  23.  
  24. /********* User code review feedback **********
  25. #### Feedback 1 ####
  26. - adjust ssid with "ciaocomeva"
  27. ********* User code review feedback **********/
  28.  
  29. /* START CODE */
  30.  
  31. #define BLYNK_PRINT Serial
  32.  
  33. #include <WiFi.h>
  34. #include <BlynkSimpleEsp32.h>
  35. #include "BlynkHandler.h" // Include the Blynk handler
  36.  
  37. // Your Wi-Fi credentials
  38. char ssid[] = "ciaocomeva"; // Updated SSID
  39. char password[] = "Your_PASSWORD";
  40.  
  41. // Your Blynk Auth Token
  42. char auth[] = "Your_BLYNK_AUTH_TOKEN";
  43.  
  44. // Pin where the LED is connected
  45. const int ledPin = 2; // Change this to the pin you're using
  46.  
  47. void setup() {
  48.     // Start Serial
  49.     Serial.begin(115200);
  50.    
  51.     // Connect to Wi-Fi
  52.     WiFi.begin(ssid, password);
  53.     while (WiFi.status() != WL_CONNECTED) {
  54.         delay(1000);
  55.         Serial.println("Connecting to WiFi...");
  56.     }
  57.     Serial.println("Connected to WiFi");
  58.  
  59.     // Start Blynk
  60.     Blynk.begin(auth, ssid, password);
  61.  
  62.     // Set LED pin as output
  63.     pinMode(ledPin, OUTPUT);
  64. }
  65.  
  66. void loop() {
  67.     // Run Blynk
  68.     Blynk.run();
  69. }
  70.  
  71. /* END CODE */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement