Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5315

General discussion • Re: Help - GPIO Wiring & Script for Float Switch

$
0
0
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).

Statistics: Posted by ame — Wed Mar 27, 2024 4:57 am



Viewing all articles
Browse latest Browse all 5315

Trending Articles