Help understanding this inputs and outputs

digitalWrite(pin,HIGH) does the same thing as pinMode(pin,INPUT_PULLUP) with an input pin, you're OK as is, but I would use the former in your case, just looks better IMHO. :slight_smile: