For this project, I will be creating an internet-connected device that utilizes at least two sensors of my choosing to gather data within my home environment for a week. I will need to consider the device's installation location, power source, and any necessary mechanical components to interface with the sensors. Additionally, I will determine the data saving frequency, taking into account limitations like the maximum data points per feed on platforms such as AdafruitIO, and the type of data I need to store (repeated values or only changes). Following data collection, I will develop a sketch to access and visually represent this data. Finally, I will create a documentation page detailing the process, including images or videos of my IoT device in action, along with visuals or embeds of my P5.js sketch showcasing the data representation.
This code is for an Arduino project where two sensors are used: a potentiometer (which measures how much a knob is turned) and a photocell (which measures the amount of light). The code does a few things: First, it connects to the internet using a service called Adafruit IO, which lets the Arduino send data online. In the setup()
part, the code sets up communication and waits until the Arduino is connected to Adafruit IO. Then, in the loop()
part, it constantly reads values from the potentiometer and photocell, prints those values to the screen, and sends them to Adafruit IO so they can be accessed remotely. Every 5 seconds, it repeats this process.