Fixed digitalRead to return 1 or 0