Here is the hardware list from Adafruit.com
1 x Arduino Uno R3 (Atmega328 - assembled)[ID:50] = $29.95 1 x Arduino Ethernet shield R3 with micro SD connector = $45.00 1 x 8" eTape Liquid Level Sensor + extras[ID:463] = $39.95
Connect pin #2 of the sensor to ground, then pin #3 to a 560 ohm resistor. The other side of the 560 ohm resistor to VCC (3.3V or 5V for example) to create a resistor divider. The ADC pin connects to the point between the resistor and sensor.
The programming I used, which I'm working on refining a bit, but it reads perfectly fine.
Code:
int sensorMin = 680;
int sensorMax = 783;
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
}
// the loop routine runs over and over again forever:
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A0);
Serial.println(sensorValue);
// Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V):
float depth = sensorMax - sensorValue;
Serial.println(depth);
float depth2 = sensorMax - sensorMin;
Serial.println(depth2);
float percentFull = (depth / depth2) * 100;
Serial.print("Percent Full %");
Serial.println(percentFull);
}
This is a response I received from someone regarding the code I'm using.
Like lots of analog reads that you can either average (solving your problem) or decimate to actually potentially get better resolution than 10 bits out of your 10-bit ADC. Google Decimation and Atmel, go over the paper published by Atmel and learn how right-shifting can become very interesting indeed.
He's responding to my question about my values shifting a bit, literally by .05 in either direction, this amount is completely negligible for what I'm using this for.
From there I used cosm.com for displaying the results. Its quite easy, you sign up, and create your device and it gives you all the code.
Let me know if you need to know anything else? I'm going to enclose the etape in some sort of tube to make sure it stays vertical, thats basically all I have left to do.
Let me know if you have any more questions.