i’ve taken the code from the ESP8266 demo (webthing-esp8266 on github) and refactored it to run on an ESP32. Main difference is the HTTP library because the ESP8266’s does not run on ESP32. So i’ve used ESPAsyncWebServer, which is quite similar.
I was able to run the simple LED demo and add it to a things gateway, which worked out well. But i think this needs more testing and a review. So if you happen to have an ESP32 around, feel free to check out https://github.com/aschmidt75/webthing-esp32
This is awesome! Thanks for the hard work! I think the best approach here would be to move the WebThingAdapter class to ESP8266WebThingAdapter then add an ESP32WebThingAdapter to the repo.
The repo would need to be renamed from webthing-esp8266 to webthing but that’s no big deal.
MicroPython sounds cool as well! I’m not sure if the standard library also includes an http server, but https://github.com/jczic/MicroWebSrv seems to be worth a look at. (i did not have time for it unfortunately)
@hobinjk great, should i open a pull request to shovel the code over to a branch there?
This looks great, thanks for the hard work! Make a PR whenever you’re ready and I’ll incorporate your code and start the process of renaming webthing-esp8266 to webthing on the PlatformIO and Arduino registries.