You are reading a single comment by @hansamann and its replies. Click here to read the full conversation.
  • So, got the latest results for my free-fall trials. It's working, but it's a tiny bit strange. The behavior is like this:

    I let the puck with ADXL345 fall for like 1.5 meters or so
    IF I pick it up soon thereafter, I get the Free Fall event
    IF I let it be, pick it up after some seconds, nothing is triggered.

    To me it looks like the interrupts are only activated once new accelerometer data is received. Would that make somehow sense? Below is the latest code for reference.

    var i2c = new I2C();
    i2c.setup({sda:D1, scl:D2});
    
    var accel = require("ADXL345").connect(i2c,D31);
    accel.ff(600,10);
    accel.interrupts(4,0); //INT1
    accel.measure(true);
    
    setWatch(function() {
      console.log("Free Fall");
    }, D30, {edge:"rising", debounce:250, repeat:true});
    
    setWatch(function() {
      console.log("BTN");
    }, BTN, {edge:"rising", debounce:50, repeat:true});
    
About

Avatar for hansamann @hansamann started