Advertisement
Guest User

Untitled

a guest
Sep 25th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. /*
  2.   # Example code for the moisture sensor
  3.   # Editor     : Lauren
  4.   # Date       : 13.01.2012
  5.   # Version    : 1.0
  6.   # Connect the sensor to the A0(Analog 0) pin on the Arduino board
  7.    
  8.   # the sensor value description
  9.   # 0  ~300     dry soil
  10.   # 300~700     humid soil
  11.   # 700~950     in water
  12. */
  13.  
  14. void setup(){
  15.    
  16.   Serial.begin(57600);
  17.    
  18. }
  19.  
  20. void loop(){
  21.    
  22.   Serial.print("Moisture Sensor Value:");
  23.   Serial.println(analogRead(A0)); 
  24.   delay(100);
  25.    
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement