How can I read binary input in a script?
In category Routers .
You can do this
/usr/bin/io get bin0 VAL=$?
or this (preferred)
VAL=`/usr/bin/io get bin0`
or you can read state of binary input directly in e.g. condition if.
if [ `io get bin0` -eq 1 ]; then . . . fi