气压传感器 =================== .. figure:: /_static/products/ledong-module/static/图片/气压传感器-H.png :width: 55% :align: center 概述 -------------------- 用于检测量大气压强的I2C通讯类的传感器。 技术参数 ------------------- 工作电压: VCC 3.3V -5V 模块尺寸:24*48mm 固定安装:2个兼容塑料积木通孔 测量范围:0-300kPa 引脚 定义 ------------------- ======= ======== 引脚 定义 ======= ======== GND 地 VCC 电源 SCL I2C时钟 SDA I2C数据 ======= ======== 使用教程 ------------------- 1、在程序编程中需要注意拨动开关地址和程序中的地址一致! 2、气压传感器测量对象为与气管导通的气体的气压,当气管不外接任何装置时测量对象为当前大气压。 示例程序 ------------------- **用掌控板OLED屏显示气压传感器的测量值和温度值。** .. code-block:: python from mpython import * from bluebit import Barometric barometric = Barometric() import time while True: oled.fill(0) oled.DispChar(str(str('当前气压值:') + str((barometric.pressure()))), 0, 0, 1) oled.DispChar(str(str('当前温度值:') + str((barometric.temperature()))), 0, 16, 1) oled.show() time.sleep(0.1) .. figure:: /_static/products/ledong-module/static/examples/气压2.png :width: 100% :align: center