Myself and a team of other engineering students are trying to use Photon to collect temperature data from a sensor, and send push notifications when the temperature exceeds certain bounds. We have created successful code, now, we want to be able to set the temperature threshold values through the Particle App.
My initial idea was to create a particle.function that takes the threshold value as a string command, converts it to integer, and then uses it in an infinite while loop that contains our if statement to send push notifications if the value is exceeded. However, when I called the function through Particle, I received an error message, presumably because the function is an infinite loop.
Does anybody have any ideas on how we could send a value to a variable from the Particle App? We are trying not to involve other applications in order to keep our project as simple as possible, but if this isn’t possible, that would be good to know as well.