Hello
I am a little confused as to how best to read the registers off of i2c from this sensor(mpu 6050). why do I have to read the high and low register, and what are they? when I ran some example code, the values where not at zero when I did not move it, is that right? also, what is the best way to read the registers, should I just use Wire.requestFrom()?
Thanks
You need two 8 bit registers (high and low) to hold a 16 bit number.
what is the best way to read the registers, should I just use Wire.requestFrom()?
Yes, followed by Wire.read().
Oh, I just thought about this, a byte goes to around 127(8 bits). Still a little confused though. I read the high register only and its giving me a value of 246. how do I combine the two bytes to turn it into something I can use? Also, what kind of values should I expect?
Put the high byte into a int16_t or uint16_t, left shift by 8 bits, and logical or the int16_t / uint16_t with the low byte.
There is plenty of example code for the MPU-6050 and its relatives.
Google "arduino mpu6050", but be aware that some of the examples are pretty bad.