-
Notifications
You must be signed in to change notification settings - Fork 15
/
TinyBME280.h
40 lines (28 loc) · 969 Bytes
/
TinyBME280.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* TinyBME280 Library v2
David Johnson-Davies - www.technoblogy.com - 22nd June 2019
CC BY 4.0
Licensed under a Creative Commons Attribution 4.0 International license:
http://creativecommons.org/licenses/by/4.0/
*/
#include <stdint.h>
#include <Arduino.h>
#include <Wire.h>
#ifndef TINYBME280
#define TINYBME280
/* Function declarations */
// Can be called before BME280setup
void BME280setI2Caddress(uint8_t address);
// Sets Normal mode, no upsampling, and reads the chip calibrations
void BME280setup();
// Sets Sleep Mode for sensor
void BME280sleep ();
// Temperature in DegC, resolution is 0.01 DegC
// Output value of “5123” equals 51.23 DegC
int32_t BME280temperature();
// Pressure in Pa as unsigned 32 bit integer
// Output value of “96386” equals 96386 Pa = 963.86 hPa
uint32_t BME280pressure();
// Humidity in %RH, resolution is 0.01%RH
// Output value of “4653” represents 46.53 %RH
uint32_t BME280humidity();
#endif