Skip to content

Instantly share code, notes, and snippets.

@4noha
Created April 27, 2018 10:00
Show Gist options
  • Save 4noha/9389de94e2effd601bd842b9c75d7143 to your computer and use it in GitHub Desktop.
Save 4noha/9389de94e2effd601bd842b9c75d7143 to your computer and use it in GitHub Desktop.
echo 2 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio2/direction
sudo emacs /usr/bin/on
>
#!/bin/sh
echo 1 > /sys/class/gpio/gpio2/value
>
sudo chmod 755 /usr/bin/on
sudo cp /usr/bin/on /usr/bin/off
sudo emacs /usr/bin/off
>
#!/bin/sh
echo 0 > /sys/class/gpio/gpio2/value
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment