Skip to content

Commit 7e15f6b

Browse files
committed
update readme
1 parent 594e4c9 commit 7e15f6b

1 file changed

Lines changed: 17 additions & 31 deletions

File tree

README.rst

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,20 @@ Introduction
1818
:target: https://github.com/psf/black
1919
:alt: Code Style: Black
2020

21-
BME280 Driver for CircuitPython used for testing functionality with no hardware attached
21+
**This code is for testing purposes only! If you are looking for a Bosch BME280 driver, please use the [Adafruit_CircuitPython_BME280 library](https://github.com/adafruit/Adafruit_CircuitPython_BME280)**.
2222

23+
This driver mocks the functionality of the [Adafruit_CircuitPython_BME280 library](https://github.com/adafruit/Adafruit_CircuitPython_BME280/), allowing you to test your code without
24+
attaching physical hardware.
25+
26+
Instead of using random data, weather data is instead pulled from [the free OpenWeatherMaps API](https://openweathermap.org)
27+
and returned as if it were coming from the BME280 sensor properties. A free OpenWeatherMaps API key is **required** to use this library (see the Usage section below for more information).
2328

2429
Dependencies
2530
=============
2631
This driver depends on:
2732

2833
* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
29-
* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_
30-
* `Register <https://github.com/adafruit/Adafruit_CircuitPython_Register>`_
34+
* `Adafruit_CircuitPython_Requests <https://github.com/adafruit/Adafruit_CircuitPython_Requests>`_
3135

3236
Please ensure all dependencies are available on the CircuitPython filesystem.
3337
This is easily achieved by downloading
@@ -37,10 +41,6 @@ or individual libraries can be installed using
3741

3842
Installing from PyPI
3943
=====================
40-
.. note:: This library is not available on PyPI yet. Install documentation is included
41-
as a standard element. Stay tuned for PyPI availability!
42-
43-
.. todo:: Remove the above note if PyPI version is/will be available at time of release.
4444

4545
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
4646
PyPI <https://pypi.org/project/circuitpython-fake-bme280/>`_.
@@ -65,34 +65,20 @@ To install in a virtual environment in your current project:
6565
source .env/bin/activate
6666
pip3 install circuitpython-fake-bme280
6767
68-
Installing to a Connected CircuitPython Device with Circup
69-
==========================================================
70-
71-
Make sure that you have ``circup`` installed in your Python environment.
72-
Install it with the following command if necessary:
73-
74-
.. code-block:: shell
75-
76-
pip3 install circup
77-
78-
With ``circup`` installed and your CircuitPython device connected use the
79-
following command to install:
80-
81-
.. code-block:: shell
82-
83-
circup install fake_bme280
84-
85-
Or the following command to update an existing version:
68+
Usage Example
69+
=============
8670

87-
.. code-block:: shell
71+
To obtain an OpenWeatherMaps API key, sign up for a free account at [OpenWeatherMaps](https://openweathermap.org) and [generate an API key](https://home.openweathermap.org/api_keys). Then, in the root of this
72+
project, add a file called `settings.toml` with the following information:
8873

89-
circup update
74+
.. code-block:: toml
75+
openweather_token = "my_api_key"
76+
openweather_location = "New York, US"
77+
openweather_units = "metric"
9078

91-
Usage Example
92-
=============
79+
Where `openweather_token` is your OpenWeatherMaps API key, `openweather_location` is the location you want to pull weather data from, and `openweather_units` is the units you want the temperature to be returned in (either `metric` or `imperial`).
9380

94-
.. todo:: Add a quick, simple example. It and other examples should live in the
95-
examples folder and be included in docs/examples.rst.
81+
Then, run the code within examples/fake_bme280.py to use the "fake" BME280 sensor.
9682

9783
Documentation
9884
=============

0 commit comments

Comments
 (0)