ADC - Read potentiometer
Materials
- AmebaD [ AMB23 / AMB21 / AMB22 / BW16 / BW16-TypeC ] x 1
- Potentiometer x 1
Example
Here we connect the ameba board to a potentiometer to measure its analogue value.
Code
Copy and paste the following code into REPL.
from machine import ADC adc = ADC(0) a.read_u16()
Realtek IoT/Wi-Fi MCU Solutions . All Rights Reserved. Terms of Use