Test your knowledge
As an effect of using a pull-up resistor with a pushbutton, we will read the following value when the pushbutton is pressed in the GPIO pin to which it is connected:
A low value (0V).
A high value, that is, the IOREF voltage.
A value between 1V and 3.3V.
As an effect of using a pull-up resistor with a pushbutton, we will read the following value when the pushbutton is released in the GPIO pin to which it is connected:
A low value (0V).
A high value, that is, the IOREF voltage.
A value between 1V and 3.3V.
If we check a pushbutton status by reading the GPIO pin value to which it is connected with polling, the loop runs every 0.5 seconds and the user keeps the pushbutton pressed for 3 seconds:
The code will behave as if the pushbutton was pressed more than once.
The code will behave as if the pushbutton was pressed just once.
The code will behave as if the pushbutton was never pressed.
We have an interrupt handler for a pushbutton with the interrupt edge mode set to
mraa.EDGE_FALLING...