adafruit / Adafruit_CircuitPython_LSM6DS

CircuitPython helper library for the LSM6DS family of motion sensors from ST
MIT License
25 stars 21 forks source link

Add shake? #5

Open caternuson opened 4 years ago

caternuson commented 4 years ago

The CircuitPlayground library just did this by reusing the LIS3DH implementation. So maybe this is something that should be added to the LSM6DS library? But starting the conversation here. Since this feature is just math on the x,y,z accelo readings, it's not really hardware specific to the LSM6DS.

ladyada commented 4 years ago

there's 'significant motion' detection, wanna try adding?

caternuson commented 4 years ago

Hmm, wonder if it would work for shake? Might be more of a heavily integrated accelo reading to determine change in position: image Can at least check behavior first.

ladyada commented 4 years ago

🤷‍♀ want me to write some arduinocode?

caternuson commented 4 years ago

Sure, if you want, or I can. I like the way they put it in quotes. So just some simple sketch to test what actual behavior is.

ladyada commented 4 years ago

tried it. its not that great - basically same as pedometer, you have to shake for at least a second to get it to fire.

ladyada commented 4 years ago

tried wakeup instead - seems better. wanna try the arduino side?

caternuson commented 4 years ago

just wanna check in case it matters - which LSM6DS are you testing with? it looks like these basic detection features are common, but i might be missing something?

ladyada commented 4 years ago

im using the LSM6DS33 - other subclass chips inherit all the same functionalities

caternuson commented 4 years ago

ok, for arduino side, added some info here: https://github.com/adafruit/Adafruit_LSM6DS/issues/9

godzan commented 4 years ago

Is there any way to get this working with circuitpython?

caternuson commented 4 years ago

@godzan It will eventually. It's being worked out on the Arduino side first. You commented there as well.