I've been trying to follow this example code for interfacing my atmega328P with Mpu6050: https://www.instructables.com/Accelerometer-MPU-6050-Communication-With-AVR-MCU/
And was wondering a couple of things. First of all, the sensors on an MPU6050 are 16-bit, which means that each sensor value such as Ax, Ay etc. are 2 byte each (8-bit + 8-bit = 16-bit = 2 bytes).
The code itself reads from the following line when obtaining the values:
AcX = Wire.read()<<8 | Wire.read(); where the MSB (8-bit) are first read, and then the LSB (8-bit); which gives us 2 bytes.
So what I don't understand is why he uses float values for storing the sensor-data and not a 16-bit int? Since Floats are 4 byte long; won't that just add a bunch of zeros to the obtained 2 bytes?