init sketch file with Wifi connection
This commit is contained in:
parent
c133c97983
commit
1e82ea65a0
2 changed files with 24 additions and 0 deletions
22
esp32-env-monitor.ino
Normal file
22
esp32-env-monitor.ino
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
#include <WiFi.h>
|
||||||
|
#include "wifi_login.h"
|
||||||
|
|
||||||
|
void setup() {
|
||||||
|
|
||||||
|
//Init wifi connection
|
||||||
|
WiFi.begin(ssid, password);
|
||||||
|
|
||||||
|
while (WiFi.status() != WL_CONNECTED) {
|
||||||
|
delay(500);
|
||||||
|
//Serial.print(".");
|
||||||
|
}
|
||||||
|
|
||||||
|
//Serial.println("");
|
||||||
|
//Serial.println("WiFi connected");
|
||||||
|
//Serial.println("IP address: ");
|
||||||
|
//Serial.println(WiFi.localIP());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop() {
|
||||||
|
}
|
2
wifi_login.h
Normal file
2
wifi_login.h
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
const char* ssid = "";
|
||||||
|
const char* password = "";
|
Loading…
Reference in a new issue