您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

13 行
261B

  1. #!/bin/bash
  2. TASTER_PIN="2"
  3. # setup
  4. echo "Setup taster on pin $TASTER_PIN"
  5. echo $TASTER_PIN > /sys/class/gpio/export
  6. echo "in" > /sys/class/gpio/gpio$TASTER_PIN/direction
  7. while true; do
  8. echo -e "Taster sagt: "
  9. cat /sys/class/gpio/gpio$TASTER_PIN/value
  10. done