README
This commit is contained in:
parent
4c6741235e
commit
3d14d7e4d1
BIN
.gitea/pi.png
Normal file
BIN
.gitea/pi.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 406 KiB |
182
README.md
182
README.md
@ -1,38 +1,21 @@
|
|||||||
# bme680
|
# bme680
|
||||||
|
|
||||||
Example implementation, just lacking proven SPI connectivity for now.
|
Example implementation of BME680 software. The I2C/SPI drivers are meant to run on a Raspberry Pi 4 but you can figure out how to port it.
|
||||||
|
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Connecting the purple BME680 module board to SPI:
|
||||||
|
|
||||||
|
| SPI func | BME680 Pin | Raspberry Pi Pin |
|
||||||
|
| -------- | ---------- | ---------------- |
|
||||||
|
| MISO | "SDO" | GPIO 9 (Pin 21) |
|
||||||
|
| MOSI | "SDA" | GPIO 10 (Pin 19) |
|
||||||
|
| SCLK | "SCL" | GPIO 11 (Pin 23) |
|
||||||
|
| CS | "CS" | GPIO 8 (Pin 24) |
|
||||||
|
|
||||||
|
## spi demo
|
||||||
```
|
```
|
||||||
i2c_init
|
|
||||||
i2c_read: D0 (1) [61]
|
|
||||||
i2c_write: E0 [B6]
|
|
||||||
i2c_read: E9 (2) [5B, 66]
|
|
||||||
i2c_read: 8A (2) [97, 67]
|
|
||||||
i2c_read: 8C (1) [03]
|
|
||||||
i2c_read: 8E (2) [C0, 88]
|
|
||||||
i2c_read: 90 (2) [D4, D7]
|
|
||||||
i2c_read: 92 (1) [58]
|
|
||||||
i2c_read: 94 (2) [DC, 25]
|
|
||||||
i2c_read: 96 (2) [36, FF]
|
|
||||||
i2c_read: 99 (1) [1E]
|
|
||||||
i2c_read: 98 (1) [18]
|
|
||||||
i2c_read: 9C (1) [FC]
|
|
||||||
i2c_read: 9E (2) [73, F2]
|
|
||||||
i2c_read: A0 (1) [1E]
|
|
||||||
i2c_read: E2 (2) [FA, 31]
|
|
||||||
i2c_read: E1 (2) [3E, FA]
|
|
||||||
i2c_read: E4 (1) [00]
|
|
||||||
i2c_read: E5 (1) [2D]
|
|
||||||
i2c_read: E6 (1) [14]
|
|
||||||
i2c_read: E7 (1) [78]
|
|
||||||
i2c_read: E8 (1) [9C]
|
|
||||||
i2c_read: ED (1) [D0]
|
|
||||||
i2c_read: EB (2) [85, E9]
|
|
||||||
i2c_read: EE (1) [12]
|
|
||||||
i2c_read: 04 (1) [13]
|
|
||||||
i2c_read: 02 (1) [16]
|
|
||||||
i2c_read: 00 (1) [2E]
|
|
||||||
par_t1: 26203
|
par_t1: 26203
|
||||||
par_t2: 26519
|
par_t2: 26519
|
||||||
par_t3: 3
|
par_t3: 3
|
||||||
@ -59,98 +42,51 @@ par_g3: 18
|
|||||||
range_switching_error: 19
|
range_switching_error: 19
|
||||||
res_heat_range: 1
|
res_heat_range: 1
|
||||||
res_heat_val: 46
|
res_heat_val: 46
|
||||||
i2c_write: 74 [B4]
|
|
||||||
i2c_write: 72 [04]
|
|
||||||
i2c_write: 75 [1C]
|
|
||||||
i2c_write: 6D [BC]
|
|
||||||
i2c_write: 63 [E7]
|
|
||||||
i2c_write: 59 [28]
|
|
||||||
i2c_write: 6C [BC]
|
|
||||||
i2c_write: 62 [E7]
|
|
||||||
i2c_write: 58 [28]
|
|
||||||
i2c_write: 6B [BC]
|
|
||||||
i2c_write: 61 [E7]
|
|
||||||
i2c_write: 57 [28]
|
|
||||||
i2c_write: 6A [BC]
|
|
||||||
i2c_write: 60 [E7]
|
|
||||||
i2c_write: 56 [28]
|
|
||||||
i2c_write: 69 [BC]
|
|
||||||
i2c_write: 5F [E7]
|
|
||||||
i2c_write: 55 [28]
|
|
||||||
i2c_write: 68 [BC]
|
|
||||||
i2c_write: 5E [E7]
|
|
||||||
i2c_write: 54 [28]
|
|
||||||
i2c_write: 67 [BC]
|
|
||||||
i2c_write: 5D [E7]
|
|
||||||
i2c_write: 53 [28]
|
|
||||||
i2c_write: 66 [BC]
|
|
||||||
i2c_write: 5C [E7]
|
|
||||||
i2c_write: 52 [28]
|
|
||||||
i2c_write: 65 [BC]
|
|
||||||
i2c_write: 5B [E7]
|
|
||||||
i2c_write: 51 [28]
|
|
||||||
i2c_write: 64 [BC]
|
|
||||||
i2c_write: 5A [E7]
|
|
||||||
i2c_write: 50 [28]
|
|
||||||
i2c_write: 71 [10]
|
|
||||||
i2c_write: 70 [00]
|
|
||||||
i2c_write: 74 [B5]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
...many identical lines omitted...
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [20]
|
|
||||||
i2c_read: 1D (1) [80]
|
|
||||||
i2c_read: 22 (3) [75, 3D, D0]
|
|
||||||
i2c_read: 1F (3) [55, 22, 30]
|
|
||||||
i2c_read: 25 (2) [63, 2E]
|
|
||||||
i2c_read: 2A (2) [00, 28]
|
|
||||||
i2c_read: 2B (1) [28]
|
|
||||||
float mode
|
float mode
|
||||||
tfine: 98700.755011
|
tfine: 104478.758986
|
||||||
temp: 19.277491 degC
|
temp: 20.406008 degC
|
||||||
press: 96363.204250 Pa
|
press: 99649.423644 Pa
|
||||||
humidity: 68.749455 % RH
|
humidity: 65.368724 % RH
|
||||||
gas resistance: 48633.411307 Ohm
|
gas resistance: 10989.279979 Ohm
|
||||||
== for heater target=320.0 and ambient temp=25.0 (degC)
|
== for heater target=300.0 and ambient temp=19.0 (degC)
|
||||||
i2c_deinit
|
|
||||||
```
|
```
|
||||||
Low air pressure due to storm not bad sensor
|
|
||||||
|
## i2c demo
|
||||||
|
```
|
||||||
|
par_t1: 26125
|
||||||
|
par_t2: 26370
|
||||||
|
par_t3: 3
|
||||||
|
par_p1: 36262
|
||||||
|
par_p2: -10371
|
||||||
|
par_p3: 88
|
||||||
|
par_p4: 6713
|
||||||
|
par_p5: -103
|
||||||
|
par_p6: 30
|
||||||
|
par_p7: 31
|
||||||
|
par_p8: -251
|
||||||
|
par_p9: -3158
|
||||||
|
par_p10: 30
|
||||||
|
par_h1: 776
|
||||||
|
par_h2: 1010
|
||||||
|
par_h3: 0
|
||||||
|
par_h4: 45
|
||||||
|
par_h5: 20
|
||||||
|
par_h6: 120
|
||||||
|
par_h7: -100
|
||||||
|
par_g1: 183
|
||||||
|
par_g2: 59281
|
||||||
|
par_g3: 18
|
||||||
|
range_switching_error: 19
|
||||||
|
res_heat_range: 1
|
||||||
|
res_heat_val: 39
|
||||||
|
float mode
|
||||||
|
tfine: 102706.944886
|
||||||
|
temp: 20.059950 degC
|
||||||
|
press: 99783.521673 Pa
|
||||||
|
humidity: 63.931961 % RH
|
||||||
|
gas resistance: 12028.902897 Ohm
|
||||||
|
== for heater target=300.0 and ambient temp=19.0 (degC)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Note: Two different BME680 devices, one on each type of bus. Low air pressure due to storm not bad sensor.
|
||||||
|
Loading…
Reference in New Issue
Block a user