ESP32 demo

Hi folks,

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 :slight_smile:

If it works out well, i’d be happy to transfer the repo over to github.com/mozilla-iot

Happy hacking,
Andreas

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.

I’m also working on an ESP32 webthing based on MicroPython. I’ll post more once I have things tied together.

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?

@hobinjk would you mind taking a look at https://github.com/aschmidt75/webthing-esp8266, it now contains both implementations. compiles for esp32.

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.

The MicroPython version for the ESP32 can be found here:

1 Like

Hi @dhylands, I also worked on ESP32 + Project Things which can be found here: http://github.com/ariestiyansyah/fitra

Hope it help :slight_smile: