TODO: fix digitalWrite to work after analogWrite