diff options
-rwxr-xr-x | ring/ring.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ring/ring.sh b/ring/ring.sh new file mode 100755 index 0000000..ab3d192 --- /dev/null +++ b/ring/ring.sh @@ -0,0 +1,17 @@ +# PB4 -> gpio2 - pin 13 +# PB10 -> gpio2 - pin 15 +echo 2 > /sys/class/gpio/export +echo 3 > /sys/class/gpio/export +echo out > /sys/class/gpio/gpio2_pb4/direction +echo out > /sys/class/gpio/gpio3_pb10/direction + +for i in $(seq 1 10); do + echo 1 > /sys/class/gpio/gpio2_pb4/value + sleep 0.001 + echo 1 > /sys/class/gpio/gpio3_pb10/value + sleep 0.001 + echo 0 > /sys/class/gpio/gpio2_pb4/value + sleep 0.001 + echo 0 > /sys/class/gpio/gpio3_pb10/value + sleep 0.001 +done |