0

I would like to activate the low pass filter of 94 Hz bandwidth on my MPU 6050. By reading the documentation (PAGE 13), it says that you activate the appropriate bandwidth by writing the selected number into address 1A (PAGE 6).

Would this inside the void setup be okay to do so?

Wire.beginTransmission(0x68);
Wire.write(0x1A);  // 
Wire.write(2);     // 
Wire.endTransmission(true);

Kind regards,

L

mcluka
  • 285
  • 1
  • 7
  • 17
  • What value do you want for EXT_SYNC_SET? This register is bit packed so you need to know what you want for both values before writing. – TomServo Aug 12 '17 at 22:31
  • for acceleration in x, y and z, so numbers 5, 6 and 7 in table on page 13... how scould I implement that? – mcluka Aug 12 '17 at 22:34
  • You can't sync on all of them. You can choose either gyro or accel in the three axes, or none (0). – TomServo Aug 12 '17 at 22:35
  • accel in 3 axes then...sorry its my first time using it – mcluka Aug 12 '17 at 22:36

1 Answers1

2

Assuming you want to just set the bandwidth setting and not the FSYNC bits, then yes you should write:

Wire.beginTransmission(0x68);
Wire.write(0x1A);  // the config address
Wire.write(0x02);  // the config value
Wire.endTransmission(true);

Other configuration registers can be set similarly, but you must be aware of bit-packed fields and concatenate them properly.

TomServo
  • 7,248
  • 5
  • 30
  • 47
  • Thank you; however, I don't really understand the FSYNC thing, even by reading it from the manual, could you maybe elaborate on that? – mcluka Aug 12 '17 at 22:44
  • Looks like you need that **only** if you want to latch a sync signal on one of those channels. From your initial question, I suspect you don't want that, you just want to read the gyro and accel values when you need them. – TomServo Aug 12 '17 at 22:48
  • 1
    Exactly yes, thank you, sir, for your time, you helped me big time! – mcluka Aug 12 '17 at 22:49