You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,13 +18,13 @@ Introduction
18
18
:target:https://github.com/psf/black
19
19
:alt:Code Style: Black
20
20
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)**.
21
+
**This code is for testing purposes only! If you are looking for a Bosch BME280 driver, please use the `Adafruit_CircuitPython_BME280 <https://github.com/adafruit/Adafruit_CircuitPython_BME280>`_**.
22
22
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
23
+
This driver mocks the functionality of the `Adafruit_CircuitPython_BME280 <https://github.com/adafruit/Adafruit_CircuitPython_BME280>`_, allowing you to test your code without
24
24
attaching physical hardware.
25
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).
26
+
Instead of using random data, weather data is instead pulled from `the OpenWeatherMaps API<https://openweathermap.org/>`_
27
+
and returned as if it were coming from the BME280 sensor properties. A free OpenWeatherMap API key is **required** to use this library (see the Usage section below for more information).
28
28
29
29
Dependencies
30
30
=============
@@ -68,17 +68,19 @@ To install in a virtual environment in your current project:
68
68
Usage Example
69
69
=============
70
70
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
71
+
To obtain an OpenWeatherMaps API key, sign up for a free account at `OpenWeatherMaps<https://openweathermap.org/>`_ and generate an API key. Then, in the root of this
72
72
project, add a file called `settings.toml` with the following information:
73
73
74
-
.. code-block:: toml
74
+
.. code-block:: shell
75
+
75
76
openweather_token = "my_api_key"
76
77
openweather_location = "New York, US"
77
78
openweather_units = "metric"
78
79
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`).
80
80
81
-
Then, run the code within examples/fake_bme280.py to use the "fake" BME280 sensor.
81
+
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").
82
+
83
+
Then, run the code within "examples/fake_bme280.py" to use the "fake" BME280 sensor.
0 commit comments