Hi, I have the home automation course and was wondering if an esp32 could be used instead of an esp8266 for outputs using mqtt?
I have the code for the esp8266 that was provided here:
https://github.com/RuiSantosdotme/Home-Automation-Course/blob/master/code/mqtt_esp8266_leds.ino
What would need to be changed in that code to make an esp32 work?
Thanks,
Bob
Looks like I can answer my own question. 😉 In case anyone else needs to know, everything is exactly the same as in that file except you don’t use #include <ESP8266WiFi.h>, remove that and put this in it’s place: #include <WiFi.h> which allows the esp32 to connect to wifi.
Using the esp32 gives you more output pins but in my case, I have version 4 that has the external antenna setup so I can now connect to the wifi from my garage where the esp8266’s were not connecting.
If your having connection issues, you might want to go with the esp32’s like I did.
Bob