My question is why the weird random values when nothing is connected to the pin and how can I account for that?
Lefty,Thanks for the quick reply. I guess my concern comes from more of my software design background and trying to test for the "floating input pin condition" to ensure that something is connected to the pins. For example lets say I had 2 of the water sensors but wanted to disconnect one. Instead of having to change the code a simple IF statement could catch this floating input pin condition, test for it and then NOT read the voltage from that pin if nothing was connected to it. This all depending on there being a way to test for the floating input pin condition, which I'm going to take a stab at and say there isn't a way from looking at the Arduino reference library. If I'm wrong please let me know.Thanks,whit3fir3
my software design background and trying to test
but is it really worth the effort
No, there is no logical method I can think of for a program to determine if a returned ADC count of say 200 was the result of a valid input voltage of that value sent by a sensor or of the results of a disconnected sensor.
Why do you want to see if the spoon is touching the pad... and (supplementary question) why is it all dolled up in that snazzy Bond, James Bond spy case?
Why do you want to see if the spoon is touching the pad.
why is it all dolled up in that snazzy Bond, James Bond spy case?
The blue button dispenses Corn Flakes, and the red dispenses Fruity Pebbles. White dispenses milk, of course. All actions are ignored unless a cereal bowl is detected on the pad. The spoon conducts according to the amount of milk dispensed, ensuring that at all times there is a proper milk/cereal ratio.It's in a flight case 'cause that's how I roll.
it might be worth a try to create a high-pass filter that you could apply to the adc input, and based on the noise level you could detect the floating input condition.
A frequency analysis of the floating values would probably be similar to white noise,