Skip to content

Commit

Permalink
Add clarifications to setup instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
lokijota committed Jan 23, 2020
1 parent 4fb8ccc commit 49bce04
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions BME680Setup.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# Install libraries to interact with the BME680 sensor
# Install libraries to interact with the BME680 sensor and call into Azure

## Bosh BSEC libraries setup

1. Run `git clone https://github.com/alexh-name/bsec_bme680_linux.git`. This is a great repo that includes C code to call Bosh's libraries. These are close source and include code to calculate an IAQ score (Interior Air Quality) that depends on other atmospheric factors. Unfortunatelly not public how this calculation is done. I'll be changing some of the code of this repo to upload readings to Azure.
1. Run `git clone https://github.com/alexh-name/bsec_bme680_linux.git`. This is a great/simple repo that includes C code to wrap Bosh's libraries. I'll be changing some of the code of this repo to upload readings to Azure.

- This will create a folder `bsec_bme680_linux`, with the two most important files there being `bsec_bme680.c` which is the code that reads from the sensor via the BSEC library, and `make.sh` which compiles this code to create the executable.
- `cd` into the `bsec_bme680_linux` folder for the following steps.

2. Follow the setup instructions on (https://github.com/alexh-name/bsec_bme680_linux).
- To copy Bosh's BSEC library to the Pi, if you're using an headless install, use something like `scp bsec_1-4-7-4_generic_release.zip pi@192.168.1.123:/home/pi/` (replacing the IP address of your Zero)
- Remember to create a path folder `src` inside `bsec_bme680_linux/`
- Also remember to `chmod +x make.sh` for it to be executable.
- To copy Bosh's BSEC library's Zip to the Zero, if you're using an headless install, use something like `scp bsec_1-4-7-4_generic_release.zip pi@192.168.1.123:/home/pi/` (replacing the IP address of your Zero). `scp` is pre-installed on Windows 10 now, like `ssh`, and stands for "Securely Copy Files".
- Remember to create a folder `src` inside `bsec_bme680_linux/` on the Zero
- Also remember to `chmod +x make.sh` for it to be executable.

3. Install I2C's tools if you haven't already. You'll need them to check if you have the I2C connection correctly set up: `sudo apt-get install i2c-tools`
3. Install I2C's tools if you haven't already. You'll need them to check if you have the I2C connection correctly set up: `sudo apt-get install i2c-tools -y`
4. Run `sudo i2cdetect -y 1`. You should see something like this:

```
Expand All @@ -24,7 +28,7 @@ pi@rpi0:~/bsec_bme680_linux $ sudo i2cdetect -y 1
70: -- -- -- -- -- -- -- 77
```

- If you don't see this, you may want to check you've enabled I2C in `raspi-config`, or check the connections from your Zero and the sensor.
- If you don't see this, you may want to check you've enabled I2C in `raspi-config`, or check the physical connections from your Zero to the sensor.

5. In what I've read online, you can have either 76 or 77 in the previous step. If you have 77 like me, you'll need to edit the file `bsec_bme680.c` file and change the line `int i2c_address = BME680_I2C_ADDR_PRIMARY;` to `int i2c_address = BME680_I2C_ADDR_SECONDARY;`. Then do another compilation by calling `./make.sh` again.

Expand Down

0 comments on commit 49bce04

Please sign in to comment.