mille-feuilleAutomatic Schematic Creation Tool

Air Pressure Sensor
(気圧センサー)

step

Features

step



対応プラットフォーム
o ATMEGA328P
o Raspberry Pi
I2Cデバイスのため、I2Cのアドレス変更ができないため、1種類のI2Cデバイスを1つだけmille-feuilleに接続できます。
Download datasheet

Main component : BMP280 - 絶対圧力を計測できます

• RMS Noise 0.2 Pa, equiv. to 1.7 cm
• Offset temperature coefficient ±1.5 Pa/K, equiv. to ±12.6 cm at 1 °C temperature change
• I2C Interface

step

Programming

Sample program for Arduino IDE
zip ファイルをArduino IDEに取り込んだ後、マイドキュメントのArduino フォルダ下のlibralyフォルダ内にあるヘッダーファイルのI2Cアドレスを0x76に書き換えると使えます。
Adafruit_BMP280 Grove_BMP280


Sample program
AirPressureTest.py
* functions *
import AirPressure

def getInfo(Number) : デバイスボードの情報を取得します
Number : 接続するベースボードのコネクタ番号を指定します

def getCalibData() :デバイスのきゃりぶレーションデータの取得
return : キャリブレーションデータ

def read(data) : 温度計測
data : キャリブレーションデータ
return : 温度、気圧、概算高度


Example:
data = AirPressure.getCalibData()
TAndP = AirPressure.read(data)

print"T = ",TAndP[0],"deg"
print"P = ",TAndP[1],"hPa"
print"Altitude = ",TAndP[2],"m" #you need calibration