How do I make an io pin 12v tolerant?
If you don't need the 3v3 GPIO to drive something with large current, but just use them as voltage outputs, you can simply add a 10k resistor in series for each pin to ensure that the internal IO expander clamping diodes don't get burnt out when 12v are applied. Then you can usually connect a pin to a higher voltage for a short time without adverse effects ((12-3v3)^2/10k = 7.57mW on the clamping diode).