jfischer / micropython-iot-hackathon

Book and other documentation to run a MicroPython hackathon
MIT License
33 stars 11 forks source link

WiFi connect function should provide feedback when connect fails #9

Closed jfischer closed 7 years ago

jfischer commented 7 years ago

It currently just tries to re-connect in a tight loop. We should print an error and sleep a bit before trying again.

jfischer commented 7 years ago

The connect is a little more complicated than I expected:

  1. It is asynchronous - you make a connect request and then call is_connected() until you get True back
  2. Connection info seems to be stored in non-volitile memory and the ESP8266 reconnects automatically upon boot up.

These are addressed via better print messages, a sleep between connection polls, and some comments in the code.