Use digital potentiometer and transistor to drive pigtailed laser diode