Arduino and the LIS3LV02DQ over SPI

Your source for all things Atmel.

Moderator: phalanx

Post Reply
User avatar
jbleecker
Posts: 30
Joined: Fri Jun 30, 2006 11:09 am

Arduino and the LIS3LV02DQ over SPI

Post by jbleecker » Sun Sep 24, 2006 8:19 am

I put together a simple tutorial on interfacing between the Arduino and the LIS3LV02DQ triple axis accelerometer. Thought it might be useful to some folks.

http://www.nearfuturelaboratory.com/200 ... elerometer

Julian
Last edited by jbleecker on Sat Jan 30, 2010 12:57 pm, edited 2 times in total.

electroinge
Posts: 4
Joined: Sun Jan 21, 2007 11:42 am

proablem with LIS3LV02DQ's and

Post by electroinge » Sun Jan 21, 2007 12:00 pm

hi i read ur help page about connecting the LIS3LV02DQ's to the Arduino useing SPI but i cant get it working the final code pin's out and in are different to the orginal pin's set up showen in the picture ,and i cant figure out what is what with the dule names for some of the LIS3LV02DQ's lines . could u please correct the code using the names printed on the LIS3LV02DQ's
board and what pin they connect to .

Boomii
Posts: 3
Joined: Thu Mar 12, 2009 6:57 am

Post by Boomii » Mon Apr 13, 2009 11:54 pm

I hook it up, and read the WHO AM I, but could not get the right x,y,z acceleration data. when there's no move, the output are not Zero. Why?

ernekin_sw
Posts: 1
Joined: Tue Sep 01, 2009 11:42 am

Re: Arduino and the LIS3LV02DQ over SPI

Post by ernekin_sw » Tue Sep 01, 2009 12:39 pm

jbleecker wrote:I put together a simple tutorial on interfacing between the Arduino and the LIS3LV02DQ triple axis accelerometer. Thought it might be useful to some folks.

http://research.techkwondo.com/blog/julian/259

Julian
Link is broken :(

User avatar
FartingMonkey92
Support Volunteer
Posts: 996
Joined: Tue Sep 09, 2008 12:00 pm
Location: United Kingdom

Re: Arduino and the LIS3LV02DQ over SPI

Post by FartingMonkey92 » Tue Sep 01, 2009 3:38 pm

ernekin_sw wrote:"Link is broken"
It is nearly 3 years old...

drvortex
Posts: 2
Joined: Sun Jan 24, 2010 11:09 pm

Post by drvortex » Thu Jan 28, 2010 8:35 am

hi all

in all my research on the LIS3LV02DQ for twi/i2c no one mentions that the default for the LIS3LV02DQ was 4 wire. so you have to change this.

there are 3 registers that have a 8 preferences each. you control the on/off by sending this Wire.send(B11010010); the comments list the presences for CTRL_REG2 in order

Wire.begin(); // join i2c bus (address optional for master)
Wire.beginTransmission(0x1D);
Wire.send(0x21); // // CTRL_REG2 (21h)
Wire.send(B11010010);

// B11010010 corresponds to the seetings for below
//FS bit is used to select Full Scale value. default = 1
//BDU bit is used to inhibit output registers update default = 1
//BLE bit is used to select Big Endian or Little Endiandefault = 0
//BOOT bit is used to refresh the content of internal registers default = 1
//IEN bit is used to switch the value present on data-ready pad default = 0
//DRDY bit is used to enable Data-Ready (RDY/INT) default = 0
//SPI 4/3 wire SIM is ‘0’ (default value) the 4-wire SIM is ‘1’ the 3-wire TWI (I2C)
//DAS bit permits to decide between 12 bit right justified and 16 bit default = 0

User avatar
jbleecker
Posts: 30
Joined: Fri Jun 30, 2006 11:09 am

Sorry for the dead link

Post by jbleecker » Sat Jan 30, 2010 12:58 pm

I've updated..that old one was from a few years ago and I didn't realize it wasn't being redirected.

http://www.nearfuturelaboratory.com/200 ... elerometer
http://www.nearfuturelaboratory.com

Post Reply