ESP8266-based boards such as NodeMCU and WeMos D1 Mini are quite popular for projects that require internet connection because of their built-in WiFi capabilities.
Bind your network SSID and password to
PWD pins and you are good to go.
Let’s build a small patch to verify that connection is successful. First, it will print “Connecting” to the debugger, then (after a little delay) your local IP if connection was successful or “Error” if something went wrong.
To output the progress to the debugger we use
On Boot to
Upload the patch to your board in debug mode. You should see something like this:
Now that you have a working internet connection, it’s time to do something useful with it. For example, fetching some data with HTTP requests.