/esp8266-basic-wifi

Basic Arduino + ESP8266 + PlatformIO demos, covering WiFi usage and monitoring, LED blinking w/timer interrupt, HTTPS/TLS, and InfluxDB. Browse the various branches.

ESP8266/Arduino/PlatformIO Demos

This project's branches contain several different ESP8266 + Arduino demos, built using PlatformIO, for the Wemos D1 Mini board:

  • Branch basic-wifi connects to a WiFi network and then periodically pings Google
  • Branch influxdb reports ping results and WiFi statistics to an InfluxDB server periodically
  • Branch https performs GET and POST requests over HTTPS, using JSON and performing proper TLS certificate verification using a root store
  • Branch letsencrypt performs a GET over HTTPS, performing proper TLS certificate verification using a small set of root certificates (Let's Encrypt's roots)

My goals for this project are:

  • Learn about this platform for myself; get good enough at it to do hobby projects.
  • Provide some good examples using what I think are best practices, since a lot of tutorial/demonstration Arduino code available online is not very good.

In particular, I'd like to note:

  • I felt it was important to provide reliable feedback via blinking the onboard LED, which also provides a demonstration of using timer interrupts.
  • I demonstrate some basic usage of a cooperative multitasking scheduler for Arduino.
  • These demo projects make the board show up as a .local domain on the network using multicast DNS.
  • Contrary to code from the majority of Ardunio/ESP8266 HTTPS tutorials & forums, my HTTPS demo project fetches the current time and loads a certificate root store, allowing for secure and flexible TLS certificate validation.

Notable third-party open-source libraries demonstrated:

Blog posts for these demos will eventually be posted at dzombak.com/blog. Thus far: