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()
Copyrights ©瑞晟微电子(苏州)有限公司 2021. All rights reserved. Terms of Use