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
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
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
card10
firmware
Commits
4e686063
Commit
4e686063
authored
5 years ago
by
koalo
Browse files
Options
Downloads
Patches
Plain Diff
doc(bhi160): Add BHI160 documentation
parent
51c6d605
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!231
doc(bhi160): Add BHI160 documentation
Pipeline
#3222
passed
5 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Documentation/index.rst
+2
-1
2 additions, 1 deletion
Documentation/index.rst
Documentation/pycardium/bhi160.rst
+102
-0
102 additions, 0 deletions
Documentation/pycardium/bhi160.rst
with
104 additions
and
1 deletion
Documentation/index.rst
+
2
−
1
View file @
4e686063
...
...
@@ -22,6 +22,7 @@ Last but not least, if you want to start hacking the lower-level firmware, the
pycardium/overview
pycardium/stdlib
pycardium/bhi160
pycardium/bme680
pycardium/buttons
pycardium/color
...
...
@@ -32,10 +33,10 @@ Last but not least, if you want to start hacking the lower-level firmware, the
pycardium/os
pycardium/personal_state
pycardium/power
pycardium/pride
pycardium/simple_menu
pycardium/utime
pycardium/vibra
pycardium/pride
.. toctree::
:maxdepth: 1
...
...
This diff is collapsed.
Click to expand it.
Documentation/pycardium/bhi160.rst
0 → 100644
+
102
−
0
View file @
4e686063
.. py:module:: bhi160
``bhi160`` - Sensor Fusion
==========================
.. versionadded:: 1.4
Supports the BHI160 sensor on the card10 for accelerometer, gyroscope...
**Example**:
.. code-block:: python
import bhi160
import utime
bhi = bhi160.BHI160Orientation()
while True:
samples = bhi.read()
print(samples)
utime.sleep(0.5)
.. class:: bhi160.BHI160Orientation(sample_rate,dynamic_range,callback,sample_buffer_len)
Orientation of the BHI160
Parameters:
sample_rate: int, optional
Sample rate (default is 4)
dynamic_range: int, optional
Dynamic range (default is 2)
callback: callable, optional
Call this callback when enough data is collected (default is None)
.. todo:: The callback functionality is untested, so do not be confused if it does not work.
sample_buffer_len: int, optional
Length of sample buffer (default is 200)
.. py:method:: read():
Read sensor values
:returns: Collected sensor values as list
.. py:method:: close():
Close the connection to the sensor
.. class:: bhi160.BHI160Accelerometer
Accelerometer of the BHI160
Parameters:
sample_rate: int, optional
Sample rate (default is 4)
dynamic_range: int, optional
Dynamic range (default is 2)
callback: callable, optional
Call this callback when enough data is collected (default is None)
.. todo:: The callback functionality is untested, so do not be confused if it does not work.
sample_buffer_len: int, optional
Length of sample buffer (default is 200)
.. py:method:: read():
Read sensor values
:returns: Collected sensor values as list
.. py:method:: close():
Close the connection to the sensor
.. class:: bhi160.BHI160Gyroscope
Gyroscope of the BHI160
Parameters:
sample_rate: int, optional
Sample rate (default is 4)
dynamic_range: int, optional
Dynamic range (default is 2)
callback: callable, optional
Call this callback when enough data is collected (default is None)
.. todo:: The callback functionality is untested, so do not be confused if it does not work.
sample_buffer_len: int, optional
Length of sample buffer (default is 200)
.. py:method:: read():
Read sensor values
:returns: Collected sensor values as list
.. py:method:: close():
Close the connection to 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