Fixes for digitalRead and analogWrite