docs: Update pyb.Accel doc to reflect changes and explain filtered_xyz.

This commit is contained in:
Damien George 2015-07-08 11:10:51 +01:00
parent 354d17523f
commit 7463442e58

View File

@ -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.