Adafruit Huzzah Wifi

My last IoT challenge was to get an

External flashing LED

working and the next was to get the Adafruit Huzzah with ESP8266 to connect to Wifi. To do that I found most the required code here:

https://learn.adafruit.com/adafruit-feather-huzzah-esp8266/using-arduino-ide#connecting-via-wifi

and I’ve put my code on my Github here:

https://github.com/directorcia/Azure/blob/master/Iot/huzzah-wifi.c

You’ll need to put in your own WiFi access point details at the top of the code to connect to your own environment.

This script uses a lot of commands like:

serial.println

which basically outputs text to a serial port. This allows much easier troubleshooting so you can see what is going on. To see this output you will however need a dedicated serial monitor console program. I started off using Putty:

https://putty.org/

which works great but upon reflection, I wanted to use something that was integrated directly into Visual Studio code. After some poking around I found this extension:

https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-serial-monitor

which is from Microsoft and seems to do what I needed.

image

You can see the output from my code above in serial monitor. Always ensure you match the output port and baud rate in the serial monitor to the device you have (here COM3 and 115200). Configuring this is very easy with the serial monitor extension.

Without much alteration, I was able to take the initial code and easily connect to my network as well as the Internet. Once connected I could ping the Adafruit Huzzah with ESP8266 from another PC in the network. A pretty painless exercise. Nice that things are becoming a little easier now I’m becoming familiar with this stuff.

So far, all I’ve done is use the Adafruit Huzzah with ESP8266 for output. Next, I’ll be to start taking simple input into the device by reading something like a button press and then taking action on that.

Stay tuned for details on that soon.

One thought on “Adafruit Huzzah Wifi

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s