I've built something like this
for using MCU pins as a joystick controller for a Sega Master System (and the pins are driven from a USB HID device connected to the MCU, but that doesn't matter).
The question is: what is the lower current to drive T1 (I'm using a C1815 because I had this one but I can change it)?
Is it better to keep current as low as possible?
Do I need R2 at all (the standard button seems to have 0-20 Ω resistance)?
The posted solution is working fine as is; I just want to know if I can make it better.
edit: MCU side is 3.3V, max pin current is 16mA Errata: R1 is 20k not 20M