Analog Reads with ADC

Intermediate

Go beyond the named sensor functions and read raw ADC values from any GPIO pin. Use MicroPython's `machine.ADC` to read the trimpot on GP27 and scale the result to a 0–100 range — the same way `pybot.light()` works under the hood.

20 min5 steps
ADCAnalogTrimpotSensorIntermediate
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 trimpot is on GP27 (ADC channel 1) and the light sensor is on GP26 (ADC channel 0). No extra wiring needed.