int SensorvalueA=0;
int sensorpin=A1;
void moistureSensor()
{
SensorvalueA = analogRead(sensorpin); // Bloom
SensorvalueA = map(SensorvalueA, 220, 640, 0, 1034);
Blynk.virtualWrite(V5, SensorvalueA);
terminal.print("Bloom ProMix % - ");
terminal.println(SensorvalueA);
terminal.flush();
}
void setup()
{
Serial.begin(9600);
dhtA.begin();
dhtB.begin();
pinMode(A0, INPUT_PULLUP); // DHT22 use internal 20k pullup resistors
pinMode(A2, INPUT_PULLUP);
pinMode(sensorpin,INPUT);
RTC.begin();
for (int allRelays = lightA; allRelays <= VentB; allRelays++)
{
pinMode(allRelays, OUTPUT);
digitalWrite(allRelays, TURN_OFF);
}
for (int p = 0; p <= 7; p++)
{
pinMode(pumpPin[p], OUTPUT);
}
timer.setInterval(1000L, moistureSensor);
timer.setInterval(3600000L, syncRTCHardware); // synchronize the RTC device with the server time every hour
timer.setInterval(1000L, displayDateTime); // update the LCD Widget every 5 seconds
timer.setInterval(blynkInterval, checkBlynk); // check connection to server per blynkInterval
Ethernet.begin(arduino_mac, arduino_ip, dns_ip, gateway_ip, subnet_mask );
Blynk.config(auth, server, port); // this is OK
Blynk.connect(); // this is OK
Serial.println("setup complete.");
}
void loop()
{
// only attempt Blynk-related functions when connected to Blynk
if (Blynk.connected())
{
Blynk.run();
}
timer.run();
}
Think I pasted code properly.
Looking for assistance.
I have a DFrobotics Capactitive Moisture Sensor and I just cant get the value to read on v5.
Looking for some assistance.
Fairly new to code so I only uploaded what appeared to be important in relation to this.
Yes I have read for 5 days on Read/Write and just cant get this figured.
Thanks