diff --git a/esp32-mqtt-emqx.ino b/esp32-mqtt-emqx.ino new file mode 100644 index 0000000..29e7eec --- /dev/null +++ b/esp32-mqtt-emqx.ino @@ -0,0 +1,27 @@ +// Summer School 2022 +// ESP32 test code for MQTT protocol using +// a free MQTT broker by emqx +// Gerardo Marx +#include +#include + +// 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(){ + +}