I’m pretty new to the Spark Core and my electronics knowledge is not the best. I am trying to create a moisture sensor with my spark core. I have two bits of wire and want to measure the resistance between the two wires. One wire is off 3v3* and the second wire is connected to A7 with a 10k resistor to GND.
When I query the core I get very random values, they will either be 0 or around the 2116 mark. This happens no matter where i put the wire.
I would expect the reading to be 4116 in water and 0 when they are in the air, but thats not what i’m seeing.
Any help would be greatful.
int moisture = 0;
// This routine runs only once upon reset
Spark.variable(“moisture”, &moisture, INT);
// This routine loops forever
moisture = analogRead(moisture);