-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Ref Docs #3
Merged
Merged
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f87a716
renamed example; 1 learn guide requires update
sommersoft aae1a22
setup docs folder
sommersoft 294b199
updated .travis & .readthedocs yml
sommersoft 3e323dd
updated README
sommersoft a355f8a
updated info docstring
sommersoft eed6cb9
sphinx fix
sommersoft 1d848ee
sphin fix2
sommersoft 96f28ea
sphin fix2.1
sommersoft e5f6b38
remove 'get/set' docstring statements; finally remembered to look
sommersoft c07fd88
updated docstrings; removed 'returns'
sommersoft f97265a
updated README; added Travis badge
sommersoft c3fc3cd
updated conf.py; bus device intersphinx link
sommersoft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,11 +25,28 @@ | |
|
||
CircuitPython module for the LSM9DS0 accelerometer, magnetometer, gyroscope. | ||
Based on the driver from: | ||
https://github.com/adafruit/Adafruit_LSM9DS0 | ||
https://github.com/adafruit/Adafruit_LSM9DS0 | ||
|
||
See examples/simpletest.py for a demo of the usage. | ||
|
||
* Author(s): Tony DiCola | ||
|
||
Implementation Notes | ||
-------------------- | ||
|
||
**Hardware:** | ||
|
||
* Adafruit `9-DOF Accel/Mag/Gyro+Temp Breakout Board - LSM9DS0 | ||
<https://www.adafruit.com/product/2021>`_ (Product ID: 2021) | ||
|
||
* FLORA `9-DOF Accelerometer/Gyroscope/Magnetometer - LSM9DS0 | ||
<https://www.adafruit.com/product/2020>`_ (Product ID: 2020) | ||
|
||
**Software and Dependencies:** | ||
|
||
* Adafruit CircuitPython firmware for the ESP8622 and M0-based boards: | ||
https://github.com/adafruit/circuitpython/releases | ||
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice | ||
""" | ||
try: | ||
import struct | ||
|
@@ -153,7 +170,7 @@ def __init__(self): | |
|
||
@property | ||
def accel_range(self): | ||
"""Get and set the accelerometer range. Must be a value of: | ||
"""The accelerometer range. Must be a value of: | ||
- ACCELRANGE_2G | ||
- ACCELRANGE_4G | ||
- ACCELRANGE_6G | ||
|
@@ -184,7 +201,7 @@ def accel_range(self, val): | |
|
||
@property | ||
def mag_gain(self): | ||
"""Get and set the magnetometer gain. Must be a value of: | ||
"""The magnetometer gain. Must be a value of: | ||
- MAGGAIN_2GAUSS | ||
- MAGGAIN_4GAUSS | ||
- MAGGAIN_8GAUSS | ||
|
@@ -212,7 +229,7 @@ def mag_gain(self, val): | |
|
||
@property | ||
def gyro_scale(self): | ||
"""Get and set the gyroscope scale. Must be a value of: | ||
"""The gyroscope scale. Must be a value of: | ||
- GYROSCALE_245DPS | ||
- GYROSCALE_500DPS | ||
- GYROSCALE_2000DPS | ||
|
@@ -248,7 +265,7 @@ def read_accel_raw(self): | |
|
||
@property | ||
def accelerometer(self): | ||
"""Get the accelerometer X, Y, Z axis values as a 3-tuple of | ||
"""Returns the accelerometer X, Y, Z axis values as a 3-tuple of | ||
m/s^2 values. | ||
""" | ||
raw = self.read_accel_raw() | ||
|
@@ -269,7 +286,7 @@ def read_mag_raw(self): | |
|
||
@property | ||
def magnetometer(self): | ||
"""Get the magnetometer X, Y, Z axis values as a 3-tuple of | ||
"""Returns the magnetometer X, Y, Z axis values as a 3-tuple of | ||
gauss values. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same. |
||
""" | ||
raw = self.read_mag_raw() | ||
|
@@ -289,7 +306,7 @@ def read_gyro_raw(self): | |
|
||
@property | ||
def gyroscope(self): | ||
"""Get the gyroscope X, Y, Z axis values as a 3-tuple of | ||
"""Returns the gyroscope X, Y, Z axis values as a 3-tuple of | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same. |
||
degrees/second values. | ||
""" | ||
raw = self.read_mag_raw() | ||
|
@@ -308,7 +325,7 @@ def read_temp_raw(self): | |
|
||
@property | ||
def temperature(self): | ||
"""Get the temperature of the sensor in degrees Celsius.""" | ||
"""Returns the temperature of the sensor in degrees Celsius.""" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same. |
||
# This is just a guess since the starting point (21C here) isn't documented :( | ||
temp = self.read_temp_raw() | ||
temp = 21.0 + temp/8 | ||
|
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Simple test | ||
------------ | ||
|
||
Ensure your device works with this simple test. | ||
|
||
.. literalinclude:: ../examples/lsm9ds0_simpletest.py | ||
:caption: examples/lsm9ds0_simpletest.py | ||
:linenos: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
.. include:: ../README.rst | ||
|
||
Table of Contents | ||
================= | ||
|
||
.. toctree:: | ||
:maxdepth: 4 | ||
:hidden: | ||
|
||
self | ||
|
||
.. toctree:: | ||
:caption: Examples | ||
|
||
examples | ||
|
||
.. toctree:: | ||
:caption: API Reference | ||
:maxdepth: 3 | ||
|
||
api | ||
|
||
.. toctree:: | ||
:caption: Tutorials | ||
|
||
.. toctree:: | ||
:caption: Related Products | ||
|
||
Adafruit 9-DOF Accel/Mag/Gyro+Temp Breakout Board - LSM9DS0 <https://www.adafruit.com/product/2021> | ||
|
||
FLORA 9-DOF Accelerometer/Gyroscope/Magnetometer - LSM9DS0 <https://www.adafruit.com/product/2020> | ||
|
||
.. toctree:: | ||
:caption: Other Links | ||
|
||
Download <https://github.com/adafruit/Adafruit_CircuitPython_LSM9DS0/releases/latest> | ||
CircuitPython Reference Documentation <https://circuitpython.readthedocs.io> | ||
CircuitPython Support Forum <https://forums.adafruit.com/viewforum.php?f=60> | ||
Discord Chat <https://adafru.it/discord> | ||
Adafruit Learning System <https://learn.adafruit.com> | ||
Adafruit Blog <https://blog.adafruit.com> | ||
Adafruit Store <https://www.adafruit.com> | ||
|
||
Indices and tables | ||
================== | ||
|
||
* :ref:`genindex` | ||
* :ref:`modindex` | ||
* :ref:`search` |
File renamed without changes.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The accelerometer ..." Doesn't need "Returns".