Seeedstudio Grove Moisture Sensor

Hello,
I have the Seeedstudio Grove Moisture Sensor and I want to know how to use it with the fez connect. I have the vcc,gnd and 2 signal wires connect on the fez connect. It seems that the code for it is in java, how will I get it to work? I am using the fez panda with the fez connect.
Thanks, :slight_smile:


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);                   
}

http://www.seeedstudio.com/wiki/Grove_-_Moisture_Sensor

Thanks,
I will read it then keep you updated.

That’s not java. It’s a short Arduino sketch.


int sensorPin = A0;  

looks illegal, unless there is a #define not included here.

@ noob123 - We’re here to help, but we are not going to write the code for you. Before posting something like this, do some research, try some code, work through bugs, and then ask specific questions with supporting information.

Well it`s Java, look at the link.

Whatever you say, dude…

Thanks,
I just saw your edited post.

One last question. this sensor has a wired 4 connection thing. If I use Gravity: Soil Moisture Sensor For Arduino - DFRobot can I use a JST3AA wire? I asked this because I also have the DHT11 (made from DFrobot) and I have to use 2 signal pins.
Thanks,
Sorry for being an idiot asking to many questions :-[