Hello
i want calibrate adxl345 with x=0 y=0 z=1g
any code for this plz?
Is google broken today? There's lots of calibration routines out there. Some are quite detailed, but easy to use.
Note I2C is not analog.
sorry for question but i don't find any solution to get x=0 y=0 and z=1g
i want to show in serial monitor x=0 y=0 and z=1g , when i move the adxl345 x and y change
thank you for helping
this for adxl335 not for adxl345
thnx
OK, then you're not asking for calibration. You're asking for the thing to detect that it's in a 1G field and show that in coordinates tied to the world and not to the device.
That's a tough problem. There are some algorithms out there that try to remove the 1G constant from the accelerometer readings. They might be helpful.
//note this program is only correct on the surface of the Earth, when stationary
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println("x=0 y=0 and z=1g");
delay(1000);
}