User Tools

Site Tools


gpio_inputs_-_button_led_control

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
gpio_inputs_-_button_led_control [2016/08/09 21:14] walkeradmingpio_inputs_-_button_led_control [2023/03/09 22:35] (current) – external edit 127.0.0.1
Line 31: Line 31:
 \\  \\ 
     sudo nano LED-Button.py     sudo nano LED-Button.py
 +\\ 
 +** You can download the code {{ :led-button.zip |Here}}: **
 \\  \\ 
     #import modules     #import modules
Line 64: Line 66:
 \\  \\ 
 \\  \\ 
 +==== The Button in Action ====
 +Here is the button turning on the LED {{:led-button.mp4|950x574|autoplay,loop}}
  
 +\\  
 +\\  
 +==== A Small Issue ==== 
 +\\  
 +While this code works without any real problems, because we are in a constant loop, this code is very heavy on CPU load, on the Pi Zero I am using this causes the processer to sit at 100 %, a better method is to use an **interrupt** 
 +\\  
 +\\  
 +This guide is comprised of information from a youtube video by **Gaven MacDonald**. Thanks Gaven. 
 +\\  
 +\\ 
gpio_inputs_-_button_led_control.1470773688.txt.gz · Last modified: 2023/03/09 22:35 (external edit)