You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
212 B
Bash

#!/bin/bash
GPIO=$1
value=$2
PATH=/sys/class/gpio/chip0
echo "executing $0 script"
echo $GPIO > $PATH/export
echo out > $PATH/gpio$GPIO/direction
echo $value > $PATH/gpio$GPIO/value
echo $GPIO > $PATH/unexport