旋钮电位器 =================== .. figure:: /_static/products/ledong-module/static/图片/旋钮电位器.png :width: 45% :align: center 概述 -------------------- 通过旋扭电位器调节AO输出模拟量,可结合其他模块作为调节控制。 技术参数 ------------------- 工作电压: VCC 3.3V -5V 模块尺寸:24*48mm 固定安装:2个兼容塑料积木通孔 数据类型:模拟采样值 引脚定义 ------------------- ===== ======== 引脚 定义 ===== ======== GND 地 VCC 电源 AO 模拟采样值 NC 空 ===== ======== 示例程序 ------------------- **用旋钮传感器控制掌控板RGB灯的亮度。** .. code-block:: python from mpython import * import time import math p0 = MPythonPin(0, PinMode.ANALOG) while True: rgb.fill( (int((p0.read_analog() / 16)), int(0), int(0)) ) rgb.write() time.sleep_ms(1) time.sleep(0.1) .. figure:: /_static/products/ledong-module/static/examples/旋钮电位器.png :width: 100% :align: center