Avoiding the floating states of the input line
When using the GPIO pins for input, the HIGH state is active when the pin is receiving 3V, and LOW when it is grounded. GPIO inputs, however, are quite sensitive and can receive unintended HIGH signals from external factors, even self-noise produced from a prototype circuit. When a GPIO input pin can jump between 0 and 1 from influences outside of its control, it is said to be in a floating state. Fortunately, we can use the Raspberry Pi Zero's built-in circuitry or make our own to ensure that our inputs remain in a consistent state, unless our circuit and programming logic wants it to change.
Note
The actual voltages are given in the data sheet. Typically 2.5V (sometimes 1.8V) and above is consider ...
Get Raspberry Pi Zero Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.