Chip : Arduino Duemilanove ATmega 328
Module : Moisture Sensor
Demo
/******************************************************* EX_07 : Soil Moisture Sensor 2013/12/24 SteveChang, PMP (sown813@gmail.com) ********************************************************/ int MoistureSensorPin1 = A0; // select the input pin for the potentiometer int MoistureSensorPin2 = A1; int MoistureSensorPin3 = A2; int SensorValue1 = 0; // variable to store the value coming from the sensor int SensorValue2 = 0; int SensorValue3 = 0; void setup() { Serial.begin(57600); } void loop() { // read the value from the sensor: SensorValue1 = analogRead(MoistureSensorPin1); SensorValue2 = analogRead(MoistureSensorPin2); SensorValue3 = analogRead(MoistureSensorPin3); delay(60000); Serial.print(SensorValue1); Serial.print(","); Serial.print(SensorValue2); Serial.print(","); Serial.println(SensorValue3); }