IoT - Modular - S-BME280.h

From The TinkerNet Wiki
Revision as of 14:27, 30 April 2021 by Tinker (talk | contribs) (Created page with "<syntaxhighlight lang="cpp" line="1"> // Bosch-Sensortec // BME280 // Humidity sensor // Measures relative humidity, barometric pressure and ambient temperature // https://www...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
 1 // Bosch-Sensortec
 2 // BME280
 3 // Humidity sensor
 4 // Measures relative humidity, barometric pressure and ambient temperature
 5 // https://www.bosch-sensortec.com/products/environmental-sensors/humidity-sensors-bme280/
 6 
 7 #ifndef BME280_H
 8 #define BME280_H
 9 
10 // BME280 I2C address is 0x76 or 0x77 (118 or 119)
11 
12 int BME280address = 0x76;
13 
14 Adafruit_BME280 bme;
15 
16 int BME280_Count; // Number of attached BME280s
17 
18 char BME280_Labels[][6] =
19     {"Temp",
20      "Humi",
21      "Baro"};
22 
23 struct BME280_Readings
24 {
25     byte Status;
26 
27     float Temperature;
28     float Humidity;
29     float AbsPressure;
30     float SeaPressure;
31 };
32 
33 extern struct BME280_Readings BME280_Datum;
34 
35 #endif // BME280_H