@@ -167,13 +167,16 @@ def acceleration(self):
167
167
def shake (self , shake_threshold = 30 , avg_count = 10 , total_delay = 0.1 ):
168
168
"""
169
169
Detect when the accelerometer is shaken. Optional parameters:
170
+
170
171
:param shake_threshold: Increase or decrease to change shake sensitivity. This
171
172
requires a minimum value of 10. 10 is the total
172
173
acceleration if the board is not moving, therefore
173
174
anything less than 10 will erroneously report a constant
174
175
shake detected. (Default 30)
176
+
175
177
:param avg_count: The number of readings taken and used for the average
176
178
acceleration. (Default 10)
179
+
177
180
:param total_delay: The total time in seconds it takes to obtain avg_count
178
181
readings from acceleration. (Default 0.1)
179
182
"""
@@ -254,10 +257,12 @@ def set_tap(self, tap, threshold, *,
254
257
255
258
:param int tap: 0 to disable tap detection, 1 to detect only single
256
259
taps, and 2 to detect only double taps.
260
+
257
261
:param int threshold: A threshold for the tap detection. The higher the value
258
262
the less sensitive the detection. This changes based on
259
263
the accelerometer range. Good values are 5-10 for 16G,
260
264
10-20 for 8G, 20-40 for 4G, and 40-80 for 2G.
265
+
261
266
:param int time_limit: TIME_LIMIT register value (default 10).
262
267
:param int time_latency: TIME_LATENCY register value (default 20).
263
268
:param int time_window: TIME_WINDOW register value (default 255).
0 commit comments