This circuit allows controlling a LASER pointer with an input logic signal. R has 10 ohm for 3 V power, 22 ohm for 6 V and 47 ohm for 12 V. The circuit was obtained in my book Robotics, Mechatronics and Artificial Intelligence, published in the United States. The transistor should have a small heatsink.