Plug the sensor to the I2C port by connecting 5V, GND , SCL, and SDA pins. Place a reflective object in front of this sensor such that the invisible laser pulse emitted from the sensor can bounce back towards the sensor. The object does not have to be a mirror. Any light coloured item will do, such as even a tennis ball.
The SG-90 Servo motors can be controlled using PWM signals with a frequency of 50Hz, and a pulse width of 500 to 2500 uS . The pulse width can be adjusted to control the angle of the servo motor.
The above code was made using Blockly to gradually rotate the servo, and measure the distance
to the nearest obstacles using the VL53L0X LIDAR. The polar plot block was then setup to plot
this in a familiar