An electronic device for use in a light detection and ranging, LIDAR, system, said electronic device comprising: a microelectromechanical system, MEMS, device comprising a plurality of electrically controllable elements, each having a reflective state and a non reflective state; said electronic device configured to: receive a beam of light from a laser; and receive a series of control signals; wherein the plurality of electrically controllable elements are configured to generate, in response to the reception of the series of control signals, a successive series of different diffraction grating patterns that are arranged to diffract the received beam of light in the form of at least one intensity maxima and output the at least one intensity maxima, wherein said at least one intensity maxima is arranged to move to a successive series of locations across a field of view, FOV, that correspond to the successive series of diffraction grating patterns, wherein each different diffraction grating pattern of the successive series of different diffraction grating patterns comprises a plurality of alternating reflective surfaces and non-reflective surfaces according to the state of the plurality of electrically controllable elements, a distance D between the plurality of alternating reflective surfaces being constant the distance D forming a grating period, and wherein each different diffraction grating pattern of the successive series of different diffraction grating patterns has a different distance D between the plurality of alternating reflective surfaces. a microelectromechanical system, MEMS, device comprising a plurality of electrically controllable elements, each having a reflective state and a non reflective state; said electronic device configured to: receive a beam of light from a laser; and receive a series of control signals; wherein the plurality of electrically controllable elements are configured to generate, in response to the reception of the series of control signals, a successive series of different diffraction grating patterns that are arranged to diffract the received beam of light in the form of at least one intensity maxima and output the at least one intensity maxima, wherein said at least one intensity maxima is arranged to move to a successive series of locations across a field of view, FOV, that correspond to the successive series of diffraction grating patterns, wherein each different diffraction grating pattern of the successive series of different diffraction grating patterns comprises a plurality of alternating reflective surfaces and non-reflective surfaces according to the state of the plurality of electrically controllable elements, a distance D between the plurality of alternating reflective surfaces being constant the distance D forming a grating period, and wherein each different diffraction grating pattern of the successive series of different diffraction grating patterns has a different distance D between the plurality of alternating reflective surfaces. receive a beam of light from a laser; and receive a series of control signals; wherein the plurality of electrically controllable elements are configured to generate, in response to the reception of the series of control signals, a successive series of different diffraction grating patterns that are arranged to diffract the received beam of light in the form of at least one intensity maxima and output the at least one intensity maxima, wherein said at least one intensity maxima is arranged to move to a successive series of locations across a field of view, FOV, that correspond to the successive series of diffraction grating patterns, wherein each different diffraction grating pattern of the successive series of different diffraction grating patterns comprises a plurality of alternating reflective surfaces and non-reflective surfaces according to the state of the plurality of electrically controllable elements, a distance D between the plurality of alternating reflective surfaces being constant the distance D forming a grating period, and wherein each different diffraction grating pattern of the successive series of different diffraction grating patterns has a different distance D between the plurality of alternating reflective surfaces.