Advertisement
Guest User

mi wifi problem

a guest
Jan 20th, 2022
81
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <Arduino.h>
  2.  
  3. /* ------------------------------------------ */
  4.  
  5. #include "WiFi.h"
  6.  
  7. const char* ssid = "Darmen";
  8. const char* password = "Poiuytre9012345";
  9.  
  10. bool flashFlag = false;
  11.  
  12.  
  13. #define CONNECTING_LED 18  // 27
  14.  
  15. /* ------------------------------------------ */
  16.  
  17. void setup() {
  18.   delay(3000);  // 3 second delay for recovery
  19.   pinMode(CONNECTING_LED, OUTPUT);
  20.   digitalWrite(CONNECTING_LED, HIGH);
  21.  
  22.   // Connect to Wi-Fi
  23.   WiFi.begin(ssid, password);
  24.   while (WiFi.status() != WL_CONNECTED) {
  25.     delay(1000);
  26.     flashFlag = !flashFlag;
  27.     if (flashFlag == true) {
  28.       digitalWrite(CONNECTING_LED, HIGH);
  29.     } else {
  30.       digitalWrite(CONNECTING_LED, LOW);
  31.     }
  32.   }
  33.   digitalWrite(CONNECTING_LED, HIGH);
  34. }
  35.  
  36. /* ------------------------------------------ */
  37.  
  38. void loop() {
  39. }
Advertisement
RAW Paste Data Copied
Advertisement