Skip to content

Commit 4a5fd08

Browse files
committed
updating comments and readme.
1 parent a125c16 commit 4a5fd08

File tree

3 files changed

+69
-7
lines changed

3 files changed

+69
-7
lines changed

README.md

+64-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ Provides an Arduino library for reading and interpreting Bosch BME280 data.
1313
* [Usage](#usage)
1414
* [Methods](#methods)
1515

16-
* [BME280(uint8_t tosr = 0x1, uint8_t hosr = 0x1, uint8_t posr = 0x1, uint8_t mode = 0x3, uint8_t st = 0x5, uint8_t filter = 0x0, bool spiEnable = false, uint8_t bme_280_addr = 0x76)](#methods)
16+
* [BME280I2C(uint8_t tosr = 0x1, uint8_t hosr = 0x1, uint8_t posr = 0x1, uint8_t mode = 0x3, uint8_t st = 0x5, uint8_t filter = 0x0, bool spiEnable = false, uint8_t bme_280_addr = 0x76)](#methods)
17+
* [BME280Spi(uint8_t spiCsPin, uint8_t tosr = 0x1, uint8_t hosr = 0x1, uint8_t posr = 0x1, uint8_t mode = 0x3, uint8_t st = 0x5, uint8_t filter = 0x0)](#methods)
18+
* [BME280SpiSw(uint8_t spiCsPin, uint8_t spiMosiPin, uint8_t spiMisoPin, uint8_t spiSckPin, uint8_t tosr = 0x1, uint8_t hosr = 0x1, uint8_t posr = 0x1, uint8_t mode = 0x3, uint8_t st = 0x5, uint8_t filter = 0x0)](#methods)
1719
* [bool begin()](#methods)
1820
* [void setMode(uint8_t mode)](#methods)
1921
* [float temp(bool celsius = true)](#methods)
@@ -64,9 +66,9 @@ Use `setMode(0x01)` to trigger a new measurement in forced mode. NOTE: It takes
6466
## Methods
6567

6668

67-
#### BME280(uint8_t tosr = 0x1, uint8_t hosr = 0x1, uint8_t posr = 0x1, uint8_t mode = 0x3, uint8_t st = 0x5, uint8_t filter = 0x0, bool spiEnable = false, uint8_t bme_280_addr = 0x76)
69+
#### BME280I2C(uint8_t tosr = 0x1, uint8_t hosr = 0x1, uint8_t posr = 0x1, uint8_t mode = 0x3, uint8_t st = 0x5, uint8_t filter = 0x0, bool spiEnable = false, uint8_t bme_280_addr = 0x76)
6870

69-
Constructor used to create the class. All parameters have default values.
71+
Constructor used to create the I2C Bme class. All parameters have default values.
7072
Return: None
7173

7274
* Temperature Oversampling Rate (tosr): uint8_t, default = 0x1
@@ -93,7 +95,66 @@ Use `setMode(0x01)` to trigger a new measurement in forced mode. NOTE: It takes
9395
* BME280 Address: uint8_t, default = 0x76
9496
values: any uint8_t
9597

98+
#### BME280Spi(uint8_t spiCsPin, uint8_t tosr = 0x1, uint8_t hosr = 0x1, uint8_t posr = 0x1, uint8_t mode = 0x3, uint8_t st = 0x5, uint8_t filter = 0x0)
9699

100+
Constructor used to create the Spi Bme class. All parameters have default values.
101+
Return: None
102+
103+
* SPI Chip Select Pin (spiCsPin): uint8_t
104+
values: Any pin 0-31
105+
106+
* Temperature Oversampling Rate (tosr): uint8_t, default = 0x1
107+
values: B000 = Skipped, B001 = x1, B010 = x2, B011 = x4, B100 = x8, B101/other = x16
108+
109+
* Humidity Oversampling Rate (hosr): uint8_t, default = 0x1
110+
values: B000 = Skipped, B001 = x1, B010 = x2, B011 = x4, B100 = x8, B101/other = x16
111+
112+
* Pressure Oversampling Rate (posr): uint8_t, default = 0x1
113+
values: B000 = Skipped, B001 = x1, B010 = x2, B011 = x4, B100 = x8, B101/other = x16
114+
115+
* Mode: uint8_t, default = Normal
116+
values: Sleep = B00, Forced = B01 and B10, Normal = B11
117+
118+
* Standby Time (st): uint8_t, default = 1000ms
119+
values: B000 = 0.5ms, B001 = 62.5ms, B010 = 125ms, B011 = 250ms, B100 = 250ms, B101 = 1000ms, B110 = 10ms, B111 = 20ms
120+
121+
* Filter: uint8_t, default = None
122+
values: B000 = off, B001 = 2, B010 = 4, B011 = 8, B100/other = 16
123+
124+
#### BME280SpiSw(uint8_t spiCsPin, uint8_t spiMosiPin, uint8_t spiMisoPin, uint8_t spiSckPin, uint8_t tosr = 0x1, uint8_t hosr = 0x1, uint8_t posr = 0x1, uint8_t mode = 0x3, uint8_t st = 0x5, uint8_t filter = 0x0)
125+
126+
Constructor used to create the software Spi Bme class. All parameters have default values.
127+
Return: None
128+
129+
* SPI Chip Select Pin (spiCsPin): uint8_t
130+
values: Any pin 0-31
131+
132+
* SPI Master Out Slave In Pin (spiMosiPin): uint8_t
133+
values: Any pin 0-31
134+
135+
* SPI Master In Slave Out Pin (spiMisoPin): uint8_t
136+
values: Any pin 0-31
137+
138+
* SPI Serial Clock Pin (spiSckPin): uint8_t
139+
values: Any pin 0-31
140+
141+
* Temperature Oversampling Rate (tosr): uint8_t, default = 0x1
142+
values: B000 = Skipped, B001 = x1, B010 = x2, B011 = x4, B100 = x8, B101/other = x16
143+
144+
* Humidity Oversampling Rate (hosr): uint8_t, default = 0x1
145+
values: B000 = Skipped, B001 = x1, B010 = x2, B011 = x4, B100 = x8, B101/other = x16
146+
147+
* Pressure Oversampling Rate (posr): uint8_t, default = 0x1
148+
values: B000 = Skipped, B001 = x1, B010 = x2, B011 = x4, B100 = x8, B101/other = x16
149+
150+
* Mode: uint8_t, default = Normal
151+
values: Sleep = B00, Forced = B01 and B10, Normal = B11
152+
153+
* Standby Time (st): uint8_t, default = 1000ms
154+
values: B000 = 0.5ms, B001 = 62.5ms, B010 = 125ms, B011 = 250ms, B100 = 250ms, B101 = 1000ms, B110 = 10ms, B111 = 20ms
155+
156+
* Filter: uint8_t, default = None
157+
values: B000 = off, B001 = 2, B010 = 4, B011 = 8, B100/other = 16
97158

98159

99160
#### bool begin()

keywords.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
BME280 KEYWORD1
1+
BME280I2C KEYWORD1
2+
BME280Spi KEYWORD1
23
begin KEYWORD2
34
temp KEYWORD2
45
pres KEYWORD2
56
hum KEYWORD2
6-
data KEYWORD2
7+
read KEYWORD2
78
alt KEYWORD2
89
dew KEYWORD2

library.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name=BME280
2-
version=2.0.01
2+
version=2.1.0
33
author=Tyler Glenn <[email protected]>
44
maintainer=Tyler Glenn <[email protected]>
5-
sentence=Provides a library for reading and interpreting Bosch BME280 environmental sensor data over I2C.
5+
sentence=Provides a library for reading and interpreting Bosch BME280 environmental sensor data over I2C and SPI.
66
paragraph=Reads temperature, humidity, and pressure. Calculates altitude and dew point. Provides functions for english and metric. Also reads pressure in Pa, hPa, inHg, atm, bar, torr, N/m^2 and psi.
77
category=Sensors
88
url=https://www.github.com/finitespace/BME280

0 commit comments

Comments
 (0)