About Plant H2O Tester for Arduino
The Plant H2O Tester was designed for use in the classroom enabling students to have a visual guide to when a plant needs water. Data analysis can be taken from the Arduino with some modification.
I hope to upload a video tutorial shortly to show how to set up the Arduino and the sensors to a breadboard.
I have attached the code here:
#include
int sensorPin = A0;
int sensorValue = 0;
int outPinRed = 9;
int outPinGreen = 10;
int outPinBlue = 11;
SoftwareSerial BT(1, 0); //TX, RX respectively
void setup() {
Serial.begin(9600);
pinMode(outPinRed, OUTPUT);
pinMode(outPinGreen, OUTPUT);
pinMode(outPinBlue, OUTPUT);
}
void loop() {
// while (Serial.available()) {
int sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
if (sensorValue > 800) {
digitalWrite(outPinRed, LOW);
digitalWrite(outPinGreen, LOW);
digitalWrite(outPinBlue, HIGH);
} else if(sensorValue > 600 && sensorValue <799) {
digitalWrite(outPinRed, LOW);
digitalWrite(outPinGreen, HIGH);
digitalWrite(outPinBlue, LOW);
} else {
digitalWrite(outPinRed, HIGH);
digitalWrite(outPinGreen, LOW);
digitalWrite(outPinBlue, LOW);
}
delay(3000);
}
//}
Download and install
Plant H2O Tester for Arduino version 1.0 on your
Android device!
Downloaded 50+ times, content rating: Everyone
Android package:
appinventor.ai_j_riddensdale.PlantH2OTester, download Plant H2O Tester for Arduino.apk