Bynk uses "Virtual Pins" to pass data between the App and the hardware.
Virtual Pin | Description | |
V1 | Moisture level of the grow bed | |
V2 | Min Humidity Level | |
V3 | Max Temperature | |
V4 | Graph (Moisture level of grow bed) | |
V5 | Humidity | |
V6 | Temp | |
V7 | Moisture | |
V8 | Save Settings | |
V9 | Water Low | |
V10 | Pump Run | |
V11 | Mister | |
V12 | Fan |
The Blynk Library calls BLYNK_WRITE(Virtual Pin#) when the appropriate virtual pin value is changed by the app.
In my Firmware once the function is called I store the Value of the Vpin in the appropriate variable for use later.
As an example
BLYNK_WRITE(V3)
/*
* sets the temperature level for the fans to come on
*/
{
maxTemp = param.asInt();
Serial.print ("Temp Set ");
Serial.println ( maxTemp);
}
every time the temp Slider is moved the value of the slider is stored and printed.
Unfortunately the value stored will be lost if the NodeMCU is ever reset - ## Need to store the values in Flash to be read when the unit reboots ##
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.