HTMAA 2024 - Week 13

Interface and Application Programming

Home

For this week, I decided to implement another thing that makes the ESP32 superior to Arduino boards: Wi-Fi compatibility.


x

In aims of doing so, I followed this tutorial on how to connect to WiFi with the ESP32.


x

I also found that this tutorial was a good demonstration of browser-to-output functionality so I very soon swapped to it.


x

So bing bang boom, I loaded some code onto an ESP32C3 and I set it to look for my phone's WiFi hotspot because, through prior experience with Harvard WiFi, it is insanely difficult to get external devices that don't have GUIs to connect to Harvard WiFi.


x

It wasn't connecting at first but thats when I found out through some forums that what was likely the issue was that there was an apostrophe in my hotspot name.


x

So I went to my iPhone's about section and changed its name to "aiman" to allow the ESP32C3 to connect without any issue.


x

Huzzah! It initiated! It gave me the address 172.20.10.5, so I tried to pull it up on my Mac but after trying for 30 minutes I could not connect to it.


x

At some point I realized that well, the phone is a hotspot, so it HAS to be able to connect to the server started by the ESP32 right?


x

Indeed it did! This was also about the time I realized that the ESP32 could act as a server, which was cool. Anyway, from now on, enjoy videos of me hooking the ESP32 up and controlling it with a phone!


x

The above shows the UI that the phone displayed using HTML code generated by the ESP32 code that gets refreshed occasionally. This next video is of the phone controlling the state of the LEDs attached to the ESP32.



Here is a video of the phone controlling the state of the LEDs and displaying it on the screen next to it!



It even works (i.e. is still able to connect to a hotspot, act as a server, and correspond with a screen) on battery power!



That's it for applications and interfaces week! This week I unlocked a powerful facet of the ESP32 not enabled by my Arduino background— WiFi! And I also reinforced the concepts I learned in Week 9, Output Devices, and Week 12, Networking and Communications. It was challenging getting the site to run initially, but after perusing some forums I was finally able to do it. For a long time WiFi had always been the next step for me before I could delve into the IoT of microcontrollers. Now that I can, there's nothing holding me back! I'm so excited to take this knowledge in new directions!



Home

Previous Week | Next Week