1 changed files with 14 additions and 10 deletions
@ -1,28 +1,32 @@ |
|||
#include <WiFi.h> |
|||
|
|||
const char* ssid = "VASE_WiFi"; |
|||
const char* password = "HESLO_OD_WiFi"; |
|||
const char* ssid = "tksteti"; |
|||
const char* password = "ProsimTeNevim"; |
|||
|
|||
const char* deviceName = "ESP-VasePrijmeni"; |
|||
|
|||
void setup() { |
|||
Serial.begin(115200); |
|||
Serial.begin(115200); //nastaveni Serioveho monitoru
|
|||
delay(10); |
|||
|
|||
WiFi.setHostname(deviceName); |
|||
|
|||
Serial.println(); |
|||
Serial.print("Pripojuji se k WiFi: "); |
|||
Serial.println(); |
|||
WiFi.begin(ssid,password); |
|||
|
|||
while(WiFi.status() != WL_CONNECTED) { |
|||
WiFi.begin(ssid,password); //začátek připojování
|
|||
while(WiFi.status() != WL_CONNECTED) { //připojování
|
|||
delay(500); |
|||
Serial.print("."); |
|||
} |
|||
|
|||
Serial.println(); |
|||
Serial.println("WiFi připojeno"); |
|||
Serial.println("WiFi připojeno"); // po připojení
|
|||
Serial.print("IP adresa: "); |
|||
Serial.println(WiFi.localIP()); |
|||
|
|||
Serial.println(WiFi.localIP()); //zobrazení IP adresy
|
|||
Serial.print("Hostname: "); |
|||
Serial.println(WiFi.getHostname()); |
|||
} |
|||
void loop(){ |
|||
|
|||
} |
Loading…
Reference in new issue