Connect the float switch to a GPIO pin and GND.
In your software, configure the GPIO pin as an input with pull-up.
Read the GPIO when you want. If the value is high then the switch is open (pull-up pulls the pin high). If the value is low then the switch is closed (switch contacts connect GPIO pin to GND).
In your software, configure the GPIO pin as an input with pull-up.
Read the GPIO when you want. If the value is high then the switch is open (pull-up pulls the pin high). If the value is low then the switch is closed (switch contacts connect GPIO pin to GND).
Statistics: Posted by ame — Wed Mar 27, 2024 4:57 am