Pages: [1]   Go Down
Author Topic: LIS331 Acceleromerter  (Read 673 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hallo, I´m searching a example code for the
https://www.sparkfun.com/products/10345
but I can not finde one which is over i2c and for arduino not for any other programm language, do anybody have an example code?

thx
druckgott
Logged

South England
Offline Offline
Full Member
***
Karma: 3
Posts: 205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You might be able to knock something together yourself! The Arduino environment has an SPI and I2C library you can use to communicate with the device. Learn how to use this and you're set for life, and can work with pretty much any module communicating over those interfaces.

Read and re-read the datasheet for that module. That'll tell you everything you need to know about which registers to write to (to set up the device) and read from (to get your data). Using plenty of #defines to give the register numbers meaningful and memorable names might make things easier to write.

Even if things don't work first time you stand to learn a lot more than if someone had just given you the code.

By the way... I could be wrong here but there's no reason that example code shouldn't work with Arduino as it is. Providing you happened to have a board set up to run at 8MHz.
Logged

Pages: [1]   Go Up
Jump to: