LaserPING Distance Sensor
The LaserPING sensor measures the time it takes infrared light to make a round trip from the laser ping, to an object, and back and sends it to the microcontroller as a pulse (a brief high signal). The amount of time the signal stays high indicates the time of flight.
Parts
(1) LaserPING 28041
(1) Resistor 220 Ω (red-red-brown-gold)
Jumper wires: Red, black
Schematic
Wiring
Script
Tests
Face the parts side of the laser ping at various target objects and compare their ruler measured distance to the micro:bit measured distance.