Distance Alert

Intermediate

Apply a threshold to the distance sensor: light a LED and sound the buzzer when an object gets too close. This is the data → decision → action pattern in action.

20 min5 steps
DistanceHC-SR04SensorLEDBuzzerIntermediate
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.