MQTT in the huzzah context.
Link to github repository. (download link)
Required Library
To work with MQTT on the Huzzah32 (ESP32) you will need to install the Arduino MQTT client library.
The .ZIP is included in the git repo linked above. You can also install it via Library Manager in Arduino — search for ArduinoMqttClient. Find the source code on github here.
If need detailed help installing a library to Arduino check this post.
Connect to Wifi
At home or in class
Example for when at home or in-class using NETART (BTW, the makerspace also has a netArt network too — same password as class). Also, did you know you can connect your Huzzah32 to a phone-based hotspot using this code?
W06_1_connectToWifi [download]
Check the post / watch the video for this example.
To RU-Secure
When on campus you can connect to the RU-Secure enterprise network. Be extremely careful with your passwords if you do this. Make sure you empty the secretes tab before sharing or posting code.
MQTT Color Picker
Similar to other color picker examples, this one sends data from browser to Huzzah32 via shiftr ( MQTT). There is a p5js project and an Arduino project inside. You will need an RGB led connected to the Huzzah32.
Main folder — W06_2_mqtt picker [download]
Check the post / watch the video for this example.
Serial Color Picker
You will need p5 serial control for this. Does exactly the same thing as above. Take the time to compare code to understand the difference between local connections and web / remote connections. Again, p5js and Arduino folders included.
Main folder — W06_3_serial picker [download]