Wifky!

Arduinoセンサ BME280 温湿度・気圧センサ

https://qiita.com/Bloccom/items/34252904c7cfa10cdd80

https://www.denshi.club/cookbook/master/wire/wire4bme280.html

https://deathmarch.net/archives/195

https://garretlab.web.fc2.com/arduino/lab/temperature_humidity_and_pressure_sensor/index.html

http://kodokuno-hobby.blog.jp/archives/7155298.html

http://labs.timedia.co.jp/2019/06/boscharduino.html

https://qiita.com/nanase/items/f34e03c29410add9c4d0

aitendo レベルコンバータ(I2C) [LVCNV-I2C]

スケッチ

#include <Wire.h>
#include "SparkFunBME280.h"

BME280 sensor;

void setup() {
Serial.begin(115200);
Wire.begin();
sensor.beginI2C(); // Wire を用いて I2C 接続開始
}

void loop() {
Serial.print("Temp: ");
Serial.print(sensor.readTempC(), 2);

Serial.print(" °C, Humidity: ");
Serial.print(sensor.readFloatHumidity(), 2);

Serial.print(" %, Pressure: ");
Serial.print(sensor.readFloatPressure() / 100.0, 1);
Serial.println(" hPa");

delay(5000);
}

BME280-2.jpg