You are reading a single comment by @hansamann and its replies. Click here to read the full conversation.
  • I have connected puck to an external ADXL345 accelerometer and reading the values XYZ works just fine. I am now trying to detect a free fall, which seems a bit more complicated.

    INT1 is connected to D30, but is never triggered. I assume my accel.interrupts call is wrong, but I cannot figure it out how to enable it correctly.

    Anyone?

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

Avatar for hansamann @hansamann started