By Darius
I received the replacement board today, thanks.

Unfortunately it has exactly the same fault as the previous board which is extremely disappointing.

ie if I press on the HMC5843 I can communicate with it like so

In [15]: print chr(i2c.get_byte(0x1e, 10)) + chr(i2c.get_byte(0x1e, 11)) + chr(i2c.get_byte(0x1e, 12));

otherwise it doesn't ACK anything.

So.. Can you ship me one that actually works? If you have a bus pirate it takes about 60 seconds to test it.
By Hector
Hi Darius,

Could you run the following sketch and let me know if it works for you or not?

#include <Wire.h>

#define DEVICE (0x53)    //ADXL345 device address
#define TO_READ (6)        //num of bytes we are going to read each time (two bytes for each axis)

byte buff[TO_READ] ;    //6 bytes buffer for saving data read from the device
char str[512];                      //string buffer to transform data before sending it to the serial port

void setup()
Wire.begin();        // join i2c bus (address optional for master)
Serial.begin(57600);  // start serial for output

//Turning on the ADXL345
writeTo(DEVICE, 0x2D, 0);     
writeTo(DEVICE, 0x2D, 16);
writeTo(DEVICE, 0x2D, 8);

void loop()
int regAddress = 0x32;    //first axis-acceleration-data register on the ADXL345
int x, y, z;

readFrom(DEVICE, regAddress, TO_READ, buff); //read the acceleration data from the ADXL345

  //each axis reading comes in 10 bit resolution, ie 2 bytes.  Least Significat Byte first!!
  //thus we are converting both bytes in to one int
x = (((int)buff[1]) << 8) | buff[0]; 
y = (((int)buff[3])<< 8) | buff[2];
z = (((int)buff[5]) << 8) | buff[4];

//we send the x y z values as a string to the serial port
sprintf(str, "%d %d %d", x, y, z); 
Serial.print(10, BYTE);

//It appears that delay is needed in order not to clog the port

//---------------- Functions
//Writes val to address register on device
void writeTo(int device, byte address, byte val) {
  Wire.beginTransmission(device); //start transmission to device
  Wire.send(address);        // send register address
  Wire.send(val);        // send value to write
  Wire.endTransmission(); //end transmission

//reads num bytes starting from address register on device in to buff array
void readFrom(int device, byte address, int num, byte buff[]) {
Wire.beginTransmission(device); //start transmission to device
Wire.send(address);        //sends address to read from
Wire.endTransmission(); //end transmission

Wire.beginTransmission(device); //start transmission to device
Wire.requestFrom(device, num);    // request 6 bytes from device

int i = 0;
while(Wire.available())    //device may send less than requested (abnormal)
  buff[i] = Wire.receive(); // receive a byte
Wire.endTransmission(); //end transmission

I have opened a sensor here and tested it. If your sensor is in fact faulty. This sensor is the one we will send you.
By Darius
I don't have an Arduino to run that on.. I'm currently just using a Bus Pirate to test it, then it will talk to an STM32F103 when I cut some code.

The code I am using is here..

I put that into a directory, cd into it and run..

env PYTHONPATH=$HOME/projects/the-bus-pirate/scripts/pyBusPirateLite /opt/local/bin/ipython-2.7

Then I can try talking to things with, eg..

i2c = test.initBP()
i2c.get_byte(0x1e, 10)

By Hector

We did some research about your problem and we found that its a common issue with the sparkfun 9DOF.


and here:

We will test the sensor thoroughly before sending it out. please request an RMA number
By Darius
I have submitted an RA form, I am waiting for the number..

I still haven't received an RA number, I have tried twice :(
By Darius
So, can you generate one for me or something?

I had this problem last time I had to return it as well, the RA email didn't arrive.
By Hector
Hi Darius,

Have you sent back the product? we will take care of the shipping charges for you. I am trying to find a 9 DOF that is working properly. It seems we got a batch of faulty 9 DOFs.
By Darius
Hi Darius,

Have you sent back the product? we will take care of the shipping charges for you. I am trying to find a 9 DOF that is working properly. It seems we got a batch of faulty 9 DOFs.

No, I haven't sent it yet.. Still no RA from your web page :( I tried again yesterday and didn't get one.

Should I send it back without an RA? If so, how should I send it?
By Hector
Hi Darius,

Sorry, I didn't notice this post until now. You can just send it with out an RA, send it the cheapest form you can we will reimburse you for the cost of shipping. It doesn't matter how long it takes to get here. If you could just send us a picture of the post receipt or send us the tracking number.

You can e-mail me at techsupport AT dfrobot DOT com