We’re planning to implement IoT to our Gardening System for our school project using the following:
–Soil Moisture Sensor
–Ultrasonic Sensor (HC-SR04) as our water level sensor
to
–Arduino Uno (as microcontroller)
–ESP8266-01 (as our Wi-Fi Module)
The problem is that, we’re only seeing reference to the mentioned sensors above (soil moisture and ultrasonic) to nodeMCU… Is it not possible to integrate in Arduino Uno and Blynk?
We tried implementing the Soil Moisture with Blynk Application
Here’s our code with ESP8266-01 as our Wi-Fi Module
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
//BlynkTimer timer;
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxxx";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "xxxxxx";
char pass[] = "xxxxxx";
BlynkTimer timer;
int sensorData;
void myTimerEvent()
{
sensorData = analogRead(A0);
Serial.print("Value: ");
Serial.println(sensorData);
int map_value = map(sensorData,1023,335,0,100);
Serial.print("Moisture: ");
Serial.print(map_value);
Serial.println("%");
delay(1500);
Blynk.virtualWrite(V5, sensorData);
Blynk.virtualWrite(V6, map_value);
}
void setup()
{
// Debug console
Serial.begin(115200);
Serial.println("Reading From the Sensor ...");
Blynk.begin(auth, ssid, pass);
timer.setInterval(1000L, myTimerEvent);
}
void loop()
{
Blynk.run();
timer.run();
}
Note: We’re getting correct values using the mentioned sensors without the Blynk, but implementing it to the app itself gives us incorrect/fluctuating values
Hello sir, thank you for responding but the project itself is focused only on Water Level Monitoring (which means it doesn’t have any integration or additional modules). We’re in need of reference in terms of integrated modules for plant monitoring and watering system.
PS, aside from libraries, pin numbering format and a few other peculities like analog bit depth, etc., they will both easily connect to multiple sensors and use pretty much the identical coding. And the Wemos itself is less then $5 online.