Hi, I’m trying to work with the 9DOF stick (http://www.sparkfun.com/products/10724)
using an arduino UNO but i cannot wake up the ADXL345.
The wake up is done by setting the measurement bit of the 0x2D register.
Manual of ADXL345 http://www.sparkfun.com/datasheets/Sens … DXL345.pdf
page 16.
#include <Wire.h>
#define DEVICE (0xA6) // ADXL345 device address when the SDO pin (12) is grounded, tested with (0x53) as well
void setup()
{
Wire.begin(); // join i2c bus (address optional for master)
Serial.begin(9600); // start serial for output
Serial.flush();
// Wake up the accelerometer
Wire.beginTransmission(DEVICE);
Wire.write(0x2D); // The address on the accel we want to set: POWER_CTL
Wire.write(8); // The value on the address: Measure(8)
Serial.println("starting");
Wire.endTransmission();
Serial.println("started");
}
void loop()
{
;
}
starting message is printed while started never appears.
I have connected the 4 wires of 9DOF stick as this:
stick Arduino
===== ========
VCC – 3.3V
GND – GND
SDA – A4
SCL – A5
I have tested various stuff and manuals but I always face the same problem.
I am looking forward to any help…