Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@rpi-hum:/home/pi# vim gpio_init.sh
- #!/bin/sh
- #shafiz 2016-12-04
- for port in 5 6
- do
- echo "$port" > /sys/class/gpio/export
- echo "out" >/sys/class/gpio/gpio${port}/direction
- echo "1" >/sys/class/gpio/gpio${port}/value
- chmod 660 /sys/class/gpio/gpio${port}/direction
- chmod 660 /sys/class/gpio/gpio${port}/value
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement