Author Topic: New 120 Module/Demo 205 Accelerometer Library Released!  (Read 449 times)

Nick_W

  • Full Member
  • ***
  • Posts: 215
    • View Profile
New 120 Module/Demo 205 Accelerometer Library Released!
« on: January 22, 2017, 05:48:52 pm »
Check out my github https://github.com/NickWaterton/mcScript

For many new programs, including:
All New LIS2DH12 library (for the 120 module and Demo 205 accelerometer)
Example programs for the accelerometer
Updated DoorSensor program for module 120
Updated Python logging program (makes viewing the accelerometer 120 example programs easy).

The new accelerometer library (V1.5) is completely re-written, and fully tested. Programs using the old incomplete library may need updating, as some function names have changed.

All bugs have been fixed* (and there were many).
All features of the accelerometer (except FIFO) have been implemented with easy to configure functions. These include.

  • Motion Detection
  • Transient Detection
  • Orientation Detection 6D and 4D
  • FreeFall Detection
  • Single and a Double Click Detection (tap)

All interrupts, modes, ranges and pins implemented.
6D, 4D (landscape/portrate) and high pass filter configurations made simple.
Readout of x,y,z pitch and roll in 8,10 and 12 bit resolution.
Sleep mode, data rates from 1 Hz to 1.5kHz
Ultra low power modes (2uA).
Easy read out functions return strings (such as "up" and "down" or "portrate_up" for Orientation detection)

Super easy to configure and use!

Plus much more.

Check it out and let me know what you think.

*This may not be true.
« Last Edit: January 25, 2017, 09:36:28 pm by Nick_W »

Share on Facebook Share on Twitter

Like Like x 2 Winner Winner x 1 View List

kbrooking

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Hello Nick, I'm preparing to jump back into the accelerometer and going to start off with your LISDH12 library. Have you had any issues with using the library on the 120 since this post that I should be aware of?

Nick_W

  • Full Member
  • ***
  • Posts: 215
    • View Profile
I haven't had any issues, but I haven't touched it in a while. I had a few people contact me with problems, but mostly from not understanding how the accelerometer works, not the library as such.

I expect that with the impending release of V 0.9, lots of things will change though.

I'm sure there is a lot of room for improvement, but it should be good for testing as-is.

dmandan

  • Newbie
  • *
  • Posts: 2
    • View Profile
Hello Nick

I'd like to get an example of accelerometer code actually working on a 205. 

Is this the demo we should be looking at?
https://github.com/NickWaterton/mcScript/blob/master/projects/205_test_1/205_test_1.mcScript

When I try to run it I just get MCStudio either hanging (using gateway), or coming back with an error when using USB:
Build Failed: Object reference not set to an instance of an object.
But there are no messages in the Errors tab so makes it a bit hard to debug...

I've got the latest firmwares on the 205 and gateway... and running the latest version of mcStudio

Any help much appreciated!

Dan


dmandan

  • Newbie
  • *
  • Posts: 2
    • View Profile
OK - scrub that - I followed your instructions from previous post here:
http://mcthings.createaforum.com/mc-demo205/tilting-trigger-on-the-accelerometer/msg1623/#msg1623

Everything worked.    Thanks.