-
Notifications
You must be signed in to change notification settings - Fork 23
Improve Ref Docs #3
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
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
36d03dd
renamed example; 1 learn guide will need updated
sommersoft 8aa6fc1
setup docs folder
sommersoft 623f86a
updated .travis & .readthedocs yml
sommersoft e90a737
updated README
sommersoft 12858a8
updated info docstring
sommersoft 697d958
sphinx fix
sommersoft 195dc2e
remove 'get/set' docstring statements; finally remembered to look
sommersoft f466ac2
updated docstrings; removed 'returns'
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 hidden or 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 hidden or 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 hidden or 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,25 @@ | |
|
||
CircuitPython module for the LSM9DS1 accelerometer, magnetometer, gyroscope. | ||
Based on the driver from: | ||
https://github.com/adafruit/Adafruit_LSM9DS1 | ||
https://github.com/adafruit/Adafruit_LSM9DS1 | ||
|
||
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 - LSM9DS1 | ||
<https://www.adafruit.com/product/3387>`_ (Product ID: 3387) | ||
|
||
**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 | ||
""" | ||
|
||
__version__ = "0.0.0-auto.0" | ||
|
@@ -166,7 +180,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_8G | ||
|
@@ -194,7 +208,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_4GAUSS | ||
- MAGGAIN_8GAUSS | ||
- MAGGAIN_12GAUSS | ||
|
@@ -222,7 +236,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 | ||
|
@@ -258,7 +272,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() | ||
|
@@ -279,7 +293,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 | ||
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. |
||
gauss values. | ||
""" | ||
raw = self.read_mag_raw() | ||
|
@@ -299,7 +313,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() | ||
|
@@ -318,7 +332,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 :( | ||
# See discussion from: | ||
# https://github.com/kriswiner/LSM9DS1/issues/3 | ||
|
Binary file not shown.
File renamed without changes.
This file contains hidden or 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 hidden or 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/lsm9ds1_simpletest.py | ||
:caption: examples/lsm9ds1_simpletest.py | ||
:linenos: |
This file contains hidden or 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,47 @@ | ||
.. 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 - LSM9DS1 <https://www.adafruit.com/product/3387> | ||
|
||
.. toctree:: | ||
:caption: Other Links | ||
|
||
Download <https://github.com/adafruit/Adafruit_CircuitPython_LSM9DS1/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".