Pages: [1]   Go Down
Author Topic: Grove I2C 3-axis Accelerometer troubles  (Read 661 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


I'm trying to use the Grove I2C 3-axis accelerometer with Arduino UNO (sketch and phtoto is in the attachment).
It works fine for several iterations (usually about 100-200)
Then it stops sending data. smiley-cry

I've tryed to use accelerometer with and without pull-up resistors, but result is exactly the same.'

Where is the root of the problem?

Thanks for advance.

* accel.ino (1.77 KB - downloaded 7 times.)

* accel i2c wire.jpg (420.17 KB, 1600x1200 - viewed 25 times.)

Offline Offline
Shannon Member
Karma: 221
Posts: 12710
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Please use code tags for code.  (The # button when composing a posting)

  while(Wire.available()) {
    if(count < 3) {
      while ( val[count] > 63 )  // reload the damn thing it is bad
        val[count] =;

That code will call when nothing is available to read.   You are not guarding the calls to read() properly.
« Last Edit: April 23, 2012, 11:26:14 am by MarkT » Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: