エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
Notify when gpio value is changed
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Notify when gpio value is changed
I'm currently trying to poll gpio value with only shell script. I basically developped the script... I'm currently trying to poll gpio value with only shell script. I basically developped the script with a test file before using /sys/class/gpio/gpioxx/value This is the solution I found : #!/bin/bash SCRIPT_DIR=$(dirname $(readlink -f $0)) FILE_NAME=$SCRIPT_DIR"/fileTest" while true do inotifywait -qq -e modify $FILE_NAME read val < $FILE_NAME echo $val ### do something here ### done This is worki