This project is the representation of a smart thermostat, remotely controllable.For do this I use IoTReady Platform, where I claim my photon, and update all the function and the variables. You can see their documentation here.
I recently started a stage experience at IoTReady, in Bergamo. My tutor ask me to realize a smart thermostat, using their platform.So I built the circuit and the I wrote the code.
How the project worksInstead of the led and the Arduino I was using a relay, which was activated when the temperature became lower than the threshold, set from IoTReady platform, and the Photon. The thermostat only worked when the switch was on.
Part of codeUsing the Particle cloud functions I realize a Particle.function() to modify the starting threshold of the thermostat. In the setup function I have declaired my function and variables.
void setup(){
Particle.function("setSoglia", setPoint);
Particle.variable("Bottone", button);
Particle.variable("Soglia", soglia);
Particle.variable("Tempreatura attuale", actualTemp);
}
Then, under the loop() I write the logic of my function.
int setPoint(String point){
soglia = point.toFloat();
return 1;
}
Comments