Now that we have seen how to use GPIO for output, let's move on to input. In this section we will look at accessing Button and ButtonDriver without using the meta driver of the Rainbow HAT. Both drivers are a layer of abstraction over GPIO, so our next step will be to learn how to work with GPIO directly. Finally, we will look at a few sensors that generate a GPIO signal and how to use them.
Using GPIO for input
Buttons
Buttons are quite simple to deal with when using the driver or the input driver, but they can also be used to learn how to use GPIO output at a low level.
Let's get into the button driver.