Code:
if (rc_dig_in11 = 1) /* 1st Autonomy code */
There's your problem right there. You just tried to assign the value
1 to the variable
rc_dig_in11. To test for equality, you must use the
== symbol, with
two equal signs.
The code you posted will
always run the BASH routine. You need to change all those single
= to double
== in your
if and
else if statements.