From 49bce04a7d5136eec108df541f827433c62ffe00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Pedro=20Martins?= Date: Thu, 23 Jan 2020 22:05:44 +0100 Subject: [PATCH] Add clarifications to setup instructions --- BME680Setup.md | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/BME680Setup.md b/BME680Setup.md index ac41f5c..fd35842 100644 --- a/BME680Setup.md +++ b/BME680Setup.md @@ -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: ``` @@ -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.