Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

Commit bb69b0f

Browse files
author
Andrew Menagarishvili
committed
BME280 example doc updates
1 parent 7d79ab3 commit bb69b0f

File tree

1 file changed

+15
-6
lines changed
  • Examples/Microsoft.PowerShell.IoT.BME280

1 file changed

+15
-6
lines changed

Examples/Microsoft.PowerShell.IoT.BME280/README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@ This PowerShell module is for interacting with [BME280 environmental sensor](htt
55
## Hardware setup
66

77
Several vendors have breakout boards with BME280 sensor. In this example we'll use [BME280 breakout board from Adafruit](https://www.adafruit.com/product/2652).
8+
89
BME280 sensor supports both I2C and SPI interfaces; in this example we'll use I2C.
10+
911
Later, in the software section, we'll need to use I2C address of the BME280 sensor.
1012
The default I2C address is 0x77. It can be changed to 0x76 by connecting SDO to GND.
13+
1114
Wiring diagram with Raspberry Pi 3 is like this:
1215

16+
![bme280_schema](https://user-images.githubusercontent.com/11860095/38394384-1899c3d4-38e3-11e8-8f8d-a93918971773.png
17+
1318
## Software setup
1419

1520
### Install PowerShell Core on Raspberry Pi
@@ -18,10 +23,10 @@ Installation instructions can be found [here](https://github.com/PowerShell/Powe
1823

1924
### Enable I2C interface on Raspberry Pi
2025

21-
1. sudo raspi-config
22-
2. 5 Interfacing options
23-
3. P5 I2C
24-
4. Would you like ARM I2C interface to be enabled -> Yes
26+
1. `sudo raspi-config`
27+
2. `5 Interfacing options`
28+
3. `P5 I2C`
29+
4. `Would you like ARM I2C interface to be enabled -> Yes`
2530

2631
### Start Powershell and install modules
2732

@@ -34,10 +39,14 @@ Import-Module ./PowerShell-IoT/Examples/Microsoft.PowerShell.IoT.BME280
3439

3540
### Collect Data
3641
```powershell
37-
PS /home/pi> $d = Get-BME280Device -Id 0x77 # I2C address of the sensor
38-
PS /home/pi> Get-BME280Data -Device $d
42+
PS /home/pi> $device = Get-BME280Device -Id 0x77 # I2C address of the sensor
43+
PS /home/pi> $data = Get-BME280Data -Device $device
44+
PS /home/pi> $data
3945
4046
Temperature Pressure Humidity
4147
----------- -------- --------
4248
26.08 1009.41 29.21
49+
50+
PS /home/pi> "Temperature in Fahrenheit = $($data.Temperature * 1.8 + 32)"
51+
Temperature in Fahrenheit = 76.69
4352
```

0 commit comments

Comments
 (0)