Measure Distance

Intermediate

Plug in the LiDAR time-of-flight distance sensor and display the live distance on the OLED. Watch the number change as you move your hand closer and farther from the sensor.

20 min5 steps
DistanceToFSensorOLEDIntermediate
0 of 5 steps

Step 1 of 5

Connect your board

Power on your Beaver Board — the OLED will show a PIN code. Click Connect in the toolbar, choose Connect via Bluetooth, and select your board. If it's your first time, enter the PIN shown on the screen.

The LiDAR distance sensor is a separate part of your kit, not built into the board. Use the 4-pin cable to plug it into the external I2C port (the 4-pin connector labelled SDA / SCL) on the Beaver Board. Later you can screw it onto the robot.

The sensor fires a short pulse of infrared laser light and times how long it takes to bounce back — light travels so fast that the sensor's chip does the timing itself. The board converts that time-of-flight into centimetres for you automatically.