User Tools

Site Tools


gpio_inputs_-_button_led_control_using_an_interrupt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
gpio_inputs_-_button_led_control_using_an_interrupt [2016/08/09 23:00] walkeradmingpio_inputs_-_button_led_control_using_an_interrupt [2016/08/09 23:00] walkeradmin
Line 25: Line 25:
         print "Button is Pressed"  # print something to the screen         print "Button is Pressed"  # print something to the screen
         GPIO.output(12,1)          # set GPIO pin 12 to high (3.3v) so LED will come on         GPIO.output(12,1)          # set GPIO pin 12 to high (3.3v) so LED will come on
 +    
     # this is where we setup the GPIO input to use the event buttonPressed that was     # this is where we setup the GPIO input to use the event buttonPressed that was
     # defined previously. bouncetime is a simple switch debouncer in mS.     # defined previously. bouncetime is a simple switch debouncer in mS.