I have a microcontroller and a Raspberry Pi, both running off of the same 5v supply, in parallel. The microcontroller has 4 5v output pins and the other is a Raspberry Pi, that can only accept inputs of 3.3v and less.
Obviously I cannot directly connect the outputs to the inputs - that'll fry the Raspberry Pi.
How can I connect 5v outputs to the GPIO pins on the Raspberry Pi?