I have an Arduino Digital Out pin connected to a 1k resistor, then connected the base of a 2N3904 transitor. In fact, that same digital out is connected to several resistor->base-of-2n3904. Each transistor is in turn driving a p-channel mosfet.
I would like to add a pushbutton to override the digital out. By that, I mean that the digital out is most of the time OFF, but sometimes ON from a brief moment. Pressing the pushbutton will have the same effect as turning ON the digital out.
I don't think I can simply add a momentary pushbutton between the digital out and +5V, can I ? This will probably feed 5V directly into the output pin. Should I maybe add a resistor in series with the pushbutton ? do I risk frying the pin by adding the pushbutton like so:
simulate this circuit – Schematic created using CircuitLab