[ITP: Connected Devices] Device Data Dashboard, TCP Socket

Process

I did a bit of work to get kinda started on the device data dashboard assignment. My goal was to create a TCP socket connection between my Arduino Nano 33 IoT NINA module and my computer’s terminal. I first started with Tom’s WiFiTCPClientLogger example. Making sure my computer was on NYU’s experimental network, sandbox370, I updated the sketch with my computer’s IP address. I also added the “arduino_secrets.h” file with the network credentials to the example’s directory. Then, in my terminal I typed “nc -l 8080” and I could see my “sensor” readings coming over port 8080. Success!

Next Steps

The next thing to do would obviously be to connect my Arduino to an actual sensor so that I can track some real data. I’ve got a TCS34725 RGB sensor that I used last semester that I could work with. I’ve also got a weird spy camera from Adafruit, I wonder if I can create any interesting projects with that.

After getting some real sensor data, I think I need to port it to a .json file and create a webpage to display my information. Yay HTML, CSS, JavaScript, DOM!

Also, this is just a note for my future self but I really want to learn how to use MQTT communication to update variables in a sketch running on a microcontroller hands-free. Would I need 2 Arduino Nano’s for that?!

Resources

https://tigoe.github.io/html-for-conndev/DeviceDataDashboard/