Bilge water alarm

Setting up a bilge water alarm is an easy task. Water level sensors using a floating device are readily available. Then it's just to connect the on/off output an IO pin on the Pi and read it from a program and raise an alarm if the float sensor is triggers. If several is required then several pins on the Pi need to be used, one for each float switch. If the switch is of the type that close when water level rise one can connect them in parallel. One closing switch will set off the alarm. There would be no information about which

float switch that set off the alarm. One might even set up a small multiplexing board that communicate a number depending of which sensor that was set off.

Python code to read the status of a certain GPIO pin could look like this:

aeProduct.getSubject()