Barometric Pressure Sensor ============================= .. figure:: /_static/products/ledong-module/static/images/barometric_sensor_h.png :width: 55% :align: center Overview -------------------- I2C communication sensor for measuring atmospheric pressure. Technical Specifications -------------------------- Operating voltage: VCC 3.3V -5V Module dimensions: 24*48mm Mounting: 2 plastic building block compatible through-holes Measurement range: 0-300kPa Pin Definition ------------------- ======= ========== Pin Definition ======= ========== GND Ground VCC Power SCL I2C clock SDA I2C data ======= ========== Usage Guide ------------------- 1. When programming, make sure the DIP switch address matches the address in the program! 2. The barometric sensor measures the pressure of gas connected through the tube. When no device is connected to the tube, it measures the current atmospheric pressure. Example Code ------------------- **Displays the barometric sensor's pressure and temperature readings on the mPython Board OLED screen.** .. code-block:: python from mpython import * from bluebit import Barometric barometric = Barometric() import time while True: oled.fill(0) oled.DispChar(str(str('Pressure: ') + str((barometric.pressure()))), 0, 0, 1) oled.DispChar(str(str('Temperature: ') + str((barometric.temperature()))), 0, 16, 1) oled.show() time.sleep(0.1) .. figure:: /_static/products/ledong-module/static/examples/barometric_sensor_2.png :width: 100% :align: center