Below are my ADXL357 accelerometer reading when calculating vibrations of a engine. I have a feeling that the g is being calculated wrong

float convert_to_g(raw_reading, sensitivity)
{
     // Convert raw readings to acceleration in g
     return (raw_reading * sensitivity) / 1000000;
}

What datatypes are raw_reading and sensitivity here? I'm surprised this even compiles if you don't name your datatypes.

1 Like