The Buttons object is an object that allows us to configure one or more GPIO channels as input to manage state changes and events in the input channels.

Basically it's a simple object that allows us to abstract and encapsulate the calls to module RPi.GPIO.
When we created the object "Buttons", we have to pass as the first parameter an "InterfaceGPIO" object
which we previously defined with one or more channels as inputs, we also had to define one or more
"callback" that we must be defined in the parameters "clicked", "pressed" or "release".

The next step will be to associate or define the configuration of those channels that we previously
defined in InterfaceGPIO object with the "setup" function. Here, we can define for each channel the
function we will want to call when the state changes and state we want to control (CLICKED, PRESSED or
RELEASE). Also we can define the initial PUD state and the value of "bouncetime".

The "callback" function takes three parameters in this order: the object "Buttons" from where the function
is called, the channel that generated the event and the event type received, for example a Buttons.PRESSED
or Buttons.CLICKED event. In this way, with a single "callback" we can control more than one object "Buttons",
more than one channel and/or more than one event.

At the bottom of the page I show a simple design consisting of 4 mini push buttons, 4 capacitors of 100nF,
4 resistors of 5k6Ω and another 4 resistors of 10KΩ. We will work with a voltage of +5V DC and to
avoid damaging the GPIO input channels of our Raspberry Pi that only works with +3.3V DC, we will use two
resistors in series as a voltage divider, this way when the push button is at rest the maximum voltage input
received in the GPIO channels will be approximately 3.2V DC. The function of the capacitor is to eliminate
any voltage spikes the push buttons may cause. The logic circuit is negative, that is, that in repose the GPIO
input has a logic 1 (+3.2V), and when pressed the button will have a logic 0 (Ground), for this reason we
must configure the GPIO channels as PUD_UP, if the logic of it is positive we have to define the channels
as PUD_DOWN.