Browse Source

WiFi working ok

wifi
parent
commit
5619122fc7
1 changed files with 27 additions and 0 deletions
  1. +27
    -0
      esp32-mqtt-emqx.ino

+ 27
- 0
esp32-mqtt-emqx.ino View File

@ -0,0 +1,27 @@
// Summer School 2022
// ESP32 test code for MQTT protocol using
// a free MQTT broker by emqx
// Gerardo Marx
#include <WiFi.h>
#include <PubSubClient.h>
// WiFi configuration
const char *ssid = "sedeam"; // WiFi name
const char *password = "Sede@m2025"; // WiFi password
WiFiClient espClient;
void setup(){
//serial communication
Serial.begin(115200);
WiFi.begin(ssid, password);
while(WiFi.status() != WL_CONNECTED){
delay(500);
Serial.print("Connecting to ");
Serial.println(ssid);
}
Serial.println("Connection done.");
}
void loop(){
}

Loading…
Cancel
Save