Skip to content

Commit f0930e1

Browse files
Merge pull request #3 from jposada202020/improxing_docs
improving_docs
2 parents f5a679f + 541788a commit f0930e1

File tree

3 files changed

+41
-3
lines changed

3 files changed

+41
-3
lines changed

adafruit_bno08x_rvc.py

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@
1313
1414
**Hardware:**
1515
16-
* `Adafruit BNO08x Breakout <https:www.adafruit.com/products/4754>`_
16+
* `Adafruit 9-DOF Orientation IMU Fusion Breakout - BNO085 (BNO080)
17+
<https://www.adafruit.com/product/4754>`_ (Product ID: 4754)
18+
1719
1820
**Software and Dependencies:**
1921
2022
* Adafruit CircuitPython firmware for the supported boards:
21-
https://github.com/adafruit/circuitpython/releases
23+
https://circuitpython.org/downloads
2224
2325
"""
2426
import time
@@ -33,7 +35,38 @@ class RVCReadTimeoutError(Exception):
3335

3436

3537
class BNO08x_RVC:
36-
"""A simple class for reading heading from the BNO08x IMUs using the UART-RVC mode"""
38+
"""A simple class for reading heading from the BNO08x IMUs using the UART-RVC mode
39+
40+
:param uart: The UART device the BNO08x_RVC is connected to.
41+
:param float timeout: time to wait for readings. Defaults to :const:`1.0`
42+
43+
44+
**Quickstart: Importing and using the device**
45+
46+
Here is an example of using the :class:`BNO08X_UART` class.
47+
First you will need to import the libraries to use the sensor
48+
49+
.. code-block:: python
50+
51+
import board
52+
import busio
53+
from adafruit_bno08x_rvc import BNO08x_RVC
54+
55+
Once this is done you can define your `busio.UART` object and define your sensor object
56+
57+
.. code-block:: python
58+
59+
uart = busio.UART(board.TX, board.RX, baudrate=3000000, receiver_buffer_size=2048)
60+
rvc = BNO08X_UART(uart)
61+
62+
63+
Now you have access to the :attr:`heading` attribute
64+
65+
.. code-block:: python
66+
67+
yaw, pitch, roll, x_accel, y_accel, z_accel = rvc.heading
68+
69+
"""
3770

3871
def __init__(self, uart, timeout=1.0):
3972
self._uart = uart

docs/api.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
77
.. automodule:: adafruit_bno08x_rvc
88
:members:
9+
:exclude-members: RVCReadTimeoutError

docs/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ Table of Contents
2323
.. toctree::
2424
:caption: Tutorials
2525

26+
Adafruit 9-DOF Orientation IMU Fusion Breakout - BNO085 (BNO080) Learning Guide <https://learn.adafruit.com/adafruit-9-dof-orientation-imu-fusion-breakout-bno085/>
27+
2628
.. toctree::
2729
:caption: Related Products
2830

31+
Adafruit 9-DOF Orientation IMU Fusion Breakout - BNO085 (BNO080) <https://www.adafruit.com/product/4754>
32+
2933
.. toctree::
3034
:caption: Other Links
3135

0 commit comments

Comments
 (0)