SunFounder 3in1 Kit
How it works?
This BLYNK_WRITE causes Blynk’s Switch widget to start the pump when it is ON and turn it off when it is OFF.
BLYNK_WRITE(V0)
{
if(param.asInt()==1){
digitalWrite(pumpA,HIGH);
}else{
digitalWrite(pumpA,LOW);
}
}
These three functions are used to get the current environment temperature, humidity, light intensity and soil moisture.
int readMoisture(){
return analogRead(moisturePin);
}
int readLight(){
return analogRead(lightPin);
}
bool readDHT() {
(continues on next page)
6.6. 6. Plant Monitor 315