I have set up a raspberry pi with a bunch of temperature probes, as found at http://raspbrew.tumblr.com/post/3985079 ... ng-ds18b20
. As pictures there, I am NOT using a breadboard (I would rather solder), I am just using the sensors, a 4.7K resistor and the cables. How they are all connected is not important, what I need to do now is make a switch that tells me if water is flowing or not.
I have 20mm PVC that I need to know when water starts and stops flowing. Its for an aquaponics system, so the beds flood and drain, and I will receive an alarm on my phone if this takes too long, as it means a pipe may have burst (at least something is wrong). It also means I can keep track of the cycle times and modify water flow etc to get them better. The temp probes will be in each tank so I can keep track of that and make graphs etc with the data.
So with the flow switch, I had suggested that I could use 2 aluminium rods (cant be any copper as the fish don't like anything that will oxidise or put any chemical in the water). Basically the 2 rods would be spaced apart, and when the water flows between them, a circuit would be made. I want to test this to see if fast flowing water or anything will cause this to fail, but I need to know how to wire it first.
I know I will probably need a 1k and a 10k resistor or something? I need multiple sensors as well, working on the same pi as the temp sensors. I guess I will need to split the 3v3 that is being used with the temp sensors, but not the 4.7K resistor? What about ground and Im guessing I will use a different input pin for each of these switches? I can't seem to find any tutorials that cover more than 1 button at once.
Also, Im using python, so what code would I use? I need to know whenever the connection is made or broken, Im guessing the best bet is an infinite loop that checks every switch, waits 5secs and then loops?
Any help would be AWESOME! Thanks