diff options
author | Damien George <damien.p.george@gmail.com> | 2015-07-08 11:10:51 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-07-08 11:10:51 +0100 |
commit | 7463442e5867cc40d59e84760606c52d2198b913 (patch) | |
tree | f36d1e8d70ac56b9d56791c5555978f153cc734f /docs/library/pyb.Accel.rst | |
parent | 354d17523f599746a84e5b22fa670c9910137947 (diff) | |
download | micropython-7463442e5867cc40d59e84760606c52d2198b913.tar.gz micropython-7463442e5867cc40d59e84760606c52d2198b913.zip |
docs: Update pyb.Accel doc to reflect changes and explain filtered_xyz.
Diffstat (limited to 'docs/library/pyb.Accel.rst')
-rw-r--r-- | docs/library/pyb.Accel.rst | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/docs/library/pyb.Accel.rst b/docs/library/pyb.Accel.rst index f2e107920e..fd96ec35f9 100644 --- a/docs/library/pyb.Accel.rst +++ b/docs/library/pyb.Accel.rst @@ -17,16 +17,6 @@ Constructors Create and return an accelerometer object. - Note: if you read accelerometer values immediately after creating this object - you will get 0. It takes around 20ms for the first sample to be ready, so, - unless you have some other code between creating this object and reading its - values, you should put a ``pyb.delay(20)`` after creating it. For example:: - - accel = pyb.Accel() - pyb.delay(20) - print(accel.x()) - - Methods ------- @@ -34,6 +24,11 @@ Methods Get a 3-tuple of filtered x, y and z values. + Implementation note: this method is currently implemented as taking the + sum of 4 samples, sampled from the 3 previous calls to this function along + with the sample from the current call. Returned values are therefore 4 + times the size of what they would be from the raw x(), y() and z() calls. + .. method:: accel.tilt() Get the tilt register. |