switch to directly reading the pins, rather than calling digitalRead