0

I have got number in this mode: Value mode = 16-bit fixed point (signed)

And how I can convert this number to floating point? Any idea?

Can I use this function, when this number is signed?

float toFloat(int16_t val) {
        return ((float)val)/256.0f;
    }
Jirka
  • 63
  • 1
  • 15

1 Answers1

1

Ok. I wrong understood. So the gyroscope data return in int16 x 1000. When I used function:

float toFloat(int16_t val) {
    return ((float)val)/1000.0f;
}

Now is receiving data good.

Jirka
  • 63
  • 1
  • 15