1 2 3 4 5 6 7 8 9 10 11 12
#!/bin/bash while true; do fuser /dev/spidev0.0 > /dev/null if [ $? == 0 ]; then mts-io-sysfs store led-lora 1 else mts-io-sysfs store led-lora 0 fi sleep 5 done