You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hmm - well the values are 16 bit signed, so -32768..32767. I guess it's possible that it went overrange and rather than clipping, the accelerometer rolls over?

    Maybe you could try this... It sets the accelerometer range to 4g (what is was before, not 2g)

    on = function(options) {
      options = options||{};
      // motion
      Puck.accelOn();
      Puck.accelWr(0x15,0x10);  // CTRL6-C - XL_HM_MODE=1, low power
      Puck.accelWr(0x0D,0x00); // INT1_CTRL - disable
      Puck.accelWr(0x11,0); // CTRL2_G power down gyro
      Puck.accelWr(0x10,0x18);  // CTRL1_XL accelerometer 12.5hz, 4g
      Puck.accelWr(0x58,0x90); // TAP_CFG - enable irq, add filter
      Puck.accelWr(0x5C,options.duration||0x02­); // WAKE_UP_DUR - very low duration
      Puck.accelWr(0x5B,options.threshold||0x0­2); // WAKE_UP_THS - low threshold
      Puck.accelWr(0x5E,0x20);  // MD1_CFG wakeup on INT1
    }
    

    But maybe if that helps it should actually be higher? 8 or 16 g?

About

Avatar for Gordon @Gordon started