gpio_inputs_-_button_led_control_using_an_interrupt
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
gpio_inputs_-_button_led_control_using_an_interrupt [2016/08/09 23:04] – walkeradmin | gpio_inputs_-_button_led_control_using_an_interrupt [2016/08/09 23:04] – walkeradmin | ||
---|---|---|---|
Line 3: | Line 3: | ||
\\ | \\ | ||
The previous example of using a button to light an LED, everything worked fine, but our processor was at 100%, this needs fixing, so in this example instead of constantly polling and setting GPIO pins, we are using a interrupt where by we do nothing until a button is actually pressed. | The previous example of using a button to light an LED, everything worked fine, but our processor was at 100%, this needs fixing, so in this example instead of constantly polling and setting GPIO pins, we are using a interrupt where by we do nothing until a button is actually pressed. | ||
+ | \\ | ||
\\ | \\ | ||
Create a new file in the normal way ( you can download the python file {{ : | Create a new file in the normal way ( you can download the python file {{ : | ||
+ | \\ | ||
+ | sudo nano LED-Button-i.py | ||
\\ | \\ | ||
#import modules | #import modules |