Skip to content

Commit 5376dfd

Browse files
authored
Merge pull request #38 from pimoroni/helgibbons-patch-1
README.md: update installation instructions
2 parents fff91c8 + ba90c01 commit 5376dfd

File tree

1 file changed

+40
-11
lines changed

1 file changed

+40
-11
lines changed

README.md

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,52 @@
77

88
Suitable for measuring ambient temperature, barometric pressure, and humidity, the BME280 is a great indoor environmental sensor.
99

10-
# Pre-requisites
10+
## Installing
1111

12-
You must enable:
12+
We'd recommend using this library with Raspberry Pi OS Bookworm or later. It requires Python ≥3.7.
1313

14-
* i2c: `sudo raspi-config nonint do_i2c 0`
14+
## Full install (recommended):
1515

16-
You can optionally run `sudo raspi-config` or the graphical Raspberry Pi Configuration UI to enable interfaces.
16+
We've created an easy installation script that will install all pre-requisites and get you up and running with minimal efforts. To run it, fire up Terminal which you'll find in Menu -> Accessories -> Terminal
17+
on your Raspberry Pi desktop, as illustrated below:
18+
19+
![Finding the terminal](http://get.pimoroni.com/resources/github-repo-terminal.png)
20+
21+
In the new terminal window type the commands exactly as it appears below (check for typos) and follow the on-screen instructions:
22+
23+
```bash
24+
git clone https://github.com/pimoroni/bme280-python
25+
cd bme280-python
26+
./install.sh
27+
```
28+
29+
**Note** Libraries will be installed in the "pimoroni" virtual environment, you will need to activate it to run examples:
30+
31+
```
32+
source ~/.virtualenvs/pimoroni/bin/activate
33+
```
1734

18-
# Installing
35+
## Development:
1936

20-
Stable library from PyPi, the smbus library is also needed:
37+
If you want to contribute, or like living on the edge of your seat by having the latest code, you can install the development version like so:
2138

22-
* Just run `python3 -m pip install pimoroni-bme280`
39+
```bash
40+
git clone https://github.com/pimoroni/bme280-python
41+
cd bme280-python
42+
./install.sh --unstable
43+
```
2344

24-
Latest/development library from GitHub:
45+
## Install stable library from PyPi and configure manually
2546

26-
* `git clone https://github.com/pimoroni/bme280-python`
27-
* `cd bme280-python`
28-
* `sudo ./install.sh`
47+
* Set up a virtual environment: `python3 -m venv --system-site-packages $HOME/.virtualenvs/pimoroni`
48+
* Switch to the virtual environment: `source ~/.virtualenvs/pimoroni/bin/activate`
49+
* Install the library: `pip install pimoroni-bme280`
50+
51+
In some cases you may need to us `sudo` or install pip with: `sudo apt install python3-pip`.
52+
53+
This will not make any configuration changes, so you may also need to enable:
54+
55+
* i2c: `sudo raspi-config nonint do_i2c 0`
56+
57+
You can optionally run `sudo raspi-config` or the graphical Raspberry Pi Configuration UI to enable interfaces.
2958

0 commit comments

Comments
 (0)