Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
swym
firmware
Commits
2c60241a
Verified
Commit
2c60241a
authored
5 years ago
by
rahix
Browse files
Options
Downloads
Patches
Plain Diff
docs: Fix bme680 docs
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
298843fd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Documentation/index.rst
+1
-0
1 addition, 0 deletions
Documentation/index.rst
Documentation/pycardium/bme680.rst
+33
-10
33 additions, 10 deletions
Documentation/pycardium/bme680.rst
with
34 additions
and
10 deletions
Documentation/index.rst
+
1
−
0
View file @
2c60241a
...
...
@@ -22,6 +22,7 @@ Last but not least, if you want to start hacking the lower-level firmware, the
pycardium/overview
pycardium/stdlib
pycardium/bme680
pycardium/buttons
pycardium/color
pycardium/display
...
...
This diff is collapsed.
Click to expand it.
Documentation/pycardium/bme680.rst
+
33
−
10
View file @
2c60241a
``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().
**Example**:
..
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).
bme680.init()
.. 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))
utime.sleep(1)
.. py:function:: init()
Initialize the sensor.
Before being able to read data from the sensor, you have to call
:py:func:`bme680.init`.
.. 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.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment