Read the Light Level

Intermediate

Read the PT19 ambient light sensor and display the value on the OLED. Apply a threshold to change LED colour based on whether the room is bright or dim.

20 min5 steps
Light SensorPT19SensorLEDOLEDIntermediate
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 PT19 phototransistor is built into the board on GP26 — no extra wiring needed.