For this project we had to come up with a problem that could be solved using particles and their WiFi capabilities. Most college kids enjoy playing video games. Its a break from school, a way to interact with friends, and just a fun way to relax on the weekend. But sitting in your tiny dorm room after a few games of PUBG, your room starts to get warm from your system overheating. It's especially worse when all your friends are gathered together. To fix this issue we wired our particles a DHT11 sensor, to monitor the temperature and fan to cool down the temperature.
To begin this project we started by ordering a DHT11 sensor, which monitors temperature and humidity in a room. To code our particle to be able to read this data, we downloaded the code from the particle library. Next we had to wire the DHT11 sensor to constant voltage and connecting the data port to one of the digital ports on the particle. After this we had to code the particle to publish events based on the temperature in the room; these events are published through the cloud onto the particle console page. From there we began connecting the second particle. We ordered a fan online, which was a lot smaller than expected. To account for this we set the HOTROOM temperature to above 80, this way you can see the fan shut off when it cools down the temperature (in our video). We had to code the second particle to subscribe to the events from the first particle and send HIGH or LOW digitalwrite to the ports; this will turn the fan on or off. This particle then sends a publish to the first particle telling it whether the fan is on or off. If the fan is on the d7 led will light up.Youtube Video
The initial error in the graph comes from the start up of the particle.