Trimpot as a Controller

Intermediate

Read the onboard trim potentiometer as an analog input from 0 to 100. Use it to control LED brightness in real time — turn the knob, change the light.

20 min5 steps
TrimpotAnalogSensorLEDIntermediate
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 trim potentiometer is connected to GP27 (ADC channel 1) — no extra wiring needed. Look for the small adjustable knob on the board.

A potentiometer is a variable resistor — turning the knob changes the voltage on GP27. The board reads that voltage and converts it to a number from 0 to 100.