jumanji
Newbie level 6

I want to design a "trigger" input into the pin of a microcontroller that is running at 5V. However, the input voltage of the trigger for a "high" could be 5V or 12V. Can I just tie the input to the base of a transistor and use it to turn on or off a 5V signal to the actual pin on the microcontroller?