ADC - 读取电位器数值
材料准备
- AmebaD [ AMB23 / AMB21 / AMB22 / BW16 / BW16-TypeC ] x 1
- 电位器 x 1
范例说明
这里我们将Ameba连接到一个电位器来测量它的模拟值。
程式码
复制粘贴以下代码到REPL上。
from machine import ADC adc = ADC(0) a.read_16()
Realtek IoT/Wi-Fi MCU Solutions . All Rights Reserved. 使用条款