digital switch ? with arduino . how to do it

You can loose the diode once you know the polarity for button connections. The "+" terminal connects to the collector, "-" terminal to emitter. Can determine polarity with multimeter (or trial and error).