In the previous section, we explored two different approaches to making our LED blink—one using the GPIOZero library and the other with the PiGPIO library. In this section, we will integrate the push button from the circuit in Figure 2.1 with Python and see how we can integrate the button using both the GPIOZero and PiGPIO libraries.
We will start by making our LED turn on and off with a button that is integrated using the GPIOZero library.