When endurance athletes train indoors on a machine, such as a treadmill or a stationary bike, they never achieve the same level of cooling as they would if they were training outside. This is because while running or cycling outdoors, air passes over their body and cools them down. While indoors and training stationary, this same cooling effect doesn't take place unless a fan is introduced.
The issue this project is meant to cover is controlling fan speed for athletes without forcing them to pause their workout to go and manually adjust it themselves. This is because when someone is working out at an easy to moderate intensity, they likely won't want the fan to be set to maximum speed. However, when they begin to increase intensity and duration, they will likely want more fan speed for more cooling. Also, when they begin to end their workout and go into a cool down mode, they will again want to change fan speed by reducing it.
The project would work by setting up a 2-way photon system to allow for controlling the fan in one location while monitoring the ambient temperature near the person working out. Since it's not feasible to measure an athletes core temperature on a continuous basis of multi-day use (do to the nature of measuring core temperature), this is the best option. It's expected that the temperature would rise anywhere from 2 to 5 degrees (sometimes more for smaller rooms and hard workouts) in a typical room space within a house after working out for approximately 15 to 30 minutes. This temperature gradient would be the basis for controlling the fan speed.
Several attempts were made to program the separate photons to communicate and act according to the logic stated earlier. Unfortunately, we were unable to solve some issues and get the project up and running fully.
We ended up trouble shooting sending temperature data through a web hook and found we weren't getting proper temperature readings which lead us to believe our temperature sensor was bad. Our plan was to use this webhook anyway, to gather data on how much heat is generated in my own room while conducting workouts.
What we did get to work, is a simple servo motor. I will provide the code and a video of it running. The Photon was programmed with a tap button through IFTTT. In this format, if it was just one photon with control of a servo motor hooked up to a fan, it would enable remote control of the fan. This idea was thought of early in the development of this project but would leave out the 2-way communication criteria of the project, thus, it was not the nature of the project.
The point of the simple servo motor control, via an IFTTT button, was just to reiterate some lessons on how to communicate the Particle Photon with other programs to complete simple tasks.