Close

Blynk Pin Assingnment

A project log for Hydroponics control

Automated control of hydroponics Garden with Control Via Blynk

saabmanSaabman 12/19/2017 at 07:170 Comments

Bynk uses "Virtual Pins" to pass data between the App and the hardware.

Virtual PinDescription
V1Moisture level of the grow bed
V2Min Humidity Level
V3Max Temperature
V4Graph (Moisture level of grow bed)
V5Humidity
V6Temp
V7Moisture
V8Save Settings

V9Water Low
V10Pump Run
V11
Mister
V12Fan

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