ขอโค้ดวัดความชื้นในดินหน่อยครับหามา 1 เดือนเต็มแล้วไม่เจอเลย รบกวนด้วยครับ
หามานานเหมือนกันครับ ไม่เจอเลย
โคดตามลิงค์ในหน้าสินค้าที่ให้ไว้เลยครับ
http://seeedstudio.com/wiki/Grove_-_Moisture_Sensor
ให้ค่ามาเป็น Analog อ่านได้ 0-1024 ค่า ตามโคดนี้ครับ
int sensorPin = A0; // select the input pin for the potentiometer int sensorValue = 0; // variable to store the value coming from the sensor void setup() { // declare the ledPin as an OUTPUT: Serial.begin(9600); } void loop() { // read the value from the sensor: sensorValue = analogRead(sensorPin); delay(1000); Serial.print("sensor = " ); Serial.println(sensorValue); }
แล้วถ้าต้องการเอาออก LCD Keypad shield ต้องทำไงครับ พอดีพึ่งหัดเล่นรบกวนด้วยครับ
LCD Keypad shield ก็มีตัวอย่างโคดในหน้าสินค้า ก็อปวางแล้วออกเลยครับ