A lens from a smartphone can be used to develop a laser scanning microscope. By using Red-pitaya, the voice coil of the lens can be driven with respect to a certain amount of current. This leads to some movement of the lens in both x and y directions. The speed of the movement depends on the frequency of the input from the Red-pitaya. The movement along with a laser can be used to develop the scanning scheme for a laser scanning confocal microscope.