Verified Commit 2c60241a authored by Rahix's avatar Rahix
Browse files

docs: Fix bme680 docs

Signed-off-by: Rahix's avatarRahix <>
parent 298843fd
Pipeline #2863 passed with stages
in 1 minute and 52 seconds
......@@ -22,6 +22,7 @@ Last but not least, if you want to start hacking the lower-level firmware, the
``bme680`` - 4-in-1 Sensor
.. py:module:: bme680
.. py:function:: bme680.init()
``bme680`` - Environmental Sensor
Before being able to read data from the sensor, you have to call init().
.. py:function:: bme680.get_data()
.. code-block:: python
Does a single measurement to get environmental data.
import bme680, utime
:return: Tuple containing ``temperature`` (°C), ``humidity`` (% r.h.),
``pressure`` (hPa) and ``gas resistance`` (Ohm).
.. py:function:: bme680.deinit()
while True:
temperature, humidity, pressure, resistance = bme680.get_data()
De-Initializes the sensor.
\ No newline at end of file
print("Temperature: {:10.2f} °C".format(temperature))
print("Humidity: {:10.2f} % r.h.".format(humidity))
print("Pressure: {:10.2f} hPa".format(pressure))
print("Gas Resistance: {:10.2f} Ω".format(resistance))
.. py:function:: init()
Initialize the sensor.
Before being able to read data from the sensor, you have to call
.. py:function:: get_data()
Perform a single measurement of environmental data.
:return: Tuple containing ``temperature`` (°C), ``humidity`` (% r.h.),
``pressure`` (hPa) and ``gas resistance`` (Ohm).
.. py:function:: deinit()
Deinitialize the sensor.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment