Barometric Pressure Sensor
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
When programming, make sure the DIP switch address matches the address in the program!
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.
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)