In a lidar gun, electronics ramp up battery power to high voltage that drives a laser diode.
lidar in Science
A method of detecting distant objects and determining their position, velocity, or other characteristics by analysis of pulsed laser light reflected from their surfaces. Lidar operates on the same principles as radar and sonar.
The equipment used in such detection. See also Doppler effect, radar, sonar.