From: Areth Foster-W. <afosterw@MIT.EDU> - 2007-01-08 17:57:05
|
I got a LIS3LV02DQ Accelerometer for christmas and have finally gotten around to rigging it up via I2C. I loaded the i2c modules and everything looked ok but when I did a cat /dev/i2c-0 it displayed an error. I'm very now to I2c so I am guessing you can't just cat it like you can with the other serial devices. I'm going to download and compile the lm-sensors package tonight but I wanted to check here to see if getting an error on cat /dev/i2c-0 is normal or if it indicates a bad wiring job. -Areth |
From: Dave H. <dhy...@gm...> - 2007-01-08 18:09:55
|
Hi Areth, On 1/8/07, Areth Foster-Webster <afo...@mi...> wrote: > I got a LIS3LV02DQ Accelerometer for christmas and have finally gotten > around to rigging it up via I2C. I loaded the i2c modules and > everything looked ok but when I did a cat /dev/i2c-0 it displayed an > error. I'm very now to I2c so I am guessing you can't just cat it like > you can with the other serial devices. I'm going to download and > compile the lm-sensors package tonight but I wanted to check here to see > if getting an error on cat /dev/i2c-0 is normal or if it indicates a bad > wiring job. You can't really cat /dev/i2c-0, since there's no way to tell it which device you want to talk to, and which register within the device you'd like to read. Try using the i2c program mentioned here: <http://docswiki.gumstix.com/I2CQuickStart#Program_for_interacting_with_I2C_devices> -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ |
From: Jesse W. <jes...@gm...> - 2007-01-08 18:12:44
|
maybe you should read this too: http://docwiki.gumstix.org/I2C_on_the_Gumstix On 1/8/07, Areth Foster-Webster <afo...@mi...> wrote: > > I got a LIS3LV02DQ Accelerometer for christmas and have finally gotten > around to rigging it up via I2C. I loaded the i2c modules and > everything looked ok but when I did a cat /dev/i2c-0 it displayed an > error. I'm very now to I2c so I am guessing you can't just cat it like > you can with the other serial devices. I'm going to download and > compile the lm-sensors package tonight but I wanted to check here to see > if getting an error on cat /dev/i2c-0 is normal or if it indicates a bad > wiring job. > > -Areth > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > -- :wq |
From: Gerhard R. <ger...@un...> - 2007-01-08 18:38:23
|
I2C is not a point to point line but a bus system with master(s) and slaves. Therefor you can't 'cat /dev/i2c-0' because the driver needs to know whom to talk to and how to handle it. (you have to send a controll byte to an address) It is easy. You need an i2c slave device (I've got a Philips PCF8591 to digitize analog sensor data), pull-up resistors. Keep cabeling short! You can use the 'i2c' program to communicate with your device. Areth Foster-Webster wrote: > I got a LIS3LV02DQ Accelerometer for christmas and have finally gotten > around to rigging it up via I2C. I loaded the i2c modules and > everything looked ok but when I did a cat /dev/i2c-0 it displayed an > error. I'm very now to I2c so I am guessing you can't just cat it like > you can with the other serial devices. I'm going to download and > compile the lm-sensors package tonight but I wanted to check here to see > if getting an error on cat /dev/i2c-0 is normal or if it indicates a bad > wiring job. > > -Areth > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > |