diff --git a/Week 4/WiFi/WiFi.esp8266.esp8266.nodemcuv2.bin b/Week 4/WiFi/WiFi.esp8266.esp8266.nodemcuv2.bin new file mode 100644 index 0000000..20e53cc Binary files /dev/null and b/Week 4/WiFi/WiFi.esp8266.esp8266.nodemcuv2.bin differ diff --git a/Week 4/WiFi/WiFi.esp8266.esp8266.nodemcuv2.elf b/Week 4/WiFi/WiFi.esp8266.esp8266.nodemcuv2.elf new file mode 100755 index 0000000..32f3648 Binary files /dev/null and b/Week 4/WiFi/WiFi.esp8266.esp8266.nodemcuv2.elf differ diff --git a/Week 4/WiFi/WiFi.ino b/Week 4/WiFi/WiFi.ino new file mode 100644 index 0000000..9c29c99 --- /dev/null +++ b/Week 4/WiFi/WiFi.ino @@ -0,0 +1,33 @@ +#include + +const char* ssid = "FundamentosRedes"; +const char* password = "00000005"; + +void setup() { + Serial.begin(115200); + Serial.println(""); + Serial.print("CONECTANDO A SSID:"); + Serial.println(ssid); + + WiFi.begin(ssid, password); + + while (WiFi.status() != WL_CONNECTED) { + delay(500); + Serial.print("."); + } + Serial.print("Conectado. Dirección IP: "); + Serial.println(WiFi.localIP()); +} + +void loop() { + if( WiFi.status() == WL_CONNECTED){ + Serial.println(""); + Serial.print("Conectado. Dirección IP: "); + Serial.println(WiFi.localIP()); + } + else{ + Serial.println(""); + Serial.println("WiFi no conectada"); + } + delay(1000); +}