Difference between revisions of "Bash the Lights"
Realitygaps (talk | contribs) (Created page with "{{Project |ProjectSkills=Basic electronics, Programming, Bash, Powerbar |ProjectStatus=Active |ProjectNiche=Electronics |ProjectPurpose=World domination }} A simple light swit...") |
|||
Line 6: | Line 6: | ||
}} | }} | ||
A simple light switch that can turn on and off the powerbar lights. | A simple light switch that can turn on and off the powerbar lights. | ||
+ | |||
+ | GL-Inet running some bash magic | ||
+ | |||
+ | <pre>echo 20 > /sys/class/gpio/export | ||
+ | echo in > /sys/class/gpio/gpio20/direction</pre> | ||
+ | |||
+ | To read button state | ||
+ | |||
+ | <pre>cat /sys/class/gpio/gpio20/value</pre> |
Revision as of 00:08, 22 November 2014
Projects | |
---|---|
Participants | Brainsmoke, Realitygaps, The JinX, Wizzup |
Skills | Basic electronics, Programming, Bash, Powerbar |
Status | Active |
Niche | Electronics |
Purpose | World domination |
A simple light switch that can turn on and off the powerbar lights.
GL-Inet running some bash magic
echo 20 > /sys/class/gpio/export echo in > /sys/class/gpio/gpio20/direction
To read button state
cat /sys/class/gpio/gpio20/value