summaryrefslogtreecommitdiff
path: root/ring/ring.sh
blob: ab3d1928578efd3c0e3ff9a64d44a4bbbb3ad9bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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