You are reading a single comment by @maby and its replies. Click here to read the full conversation.
  • I'm puzzled by what I'm seeing... I have a Puck programmed up to display the values coming back from the accelerometer :

    require("puckjsv2-accel-movement").on();­
    var idleTimeout;
    Puck.on('accel',function(a) {
      LED.set();
      if (idleTimeout) clearTimeout(idleTimeout);
      else {
        // print("Motion", a);
        var s = "{'type': 'M', 'x':" +  a.acc.x + ", 'y':" + a.acc.y + ", 'z':" + a.acc.z + ", 'gx': " + a.gyro.x + ", 'gy':" + a.gyro.y + ", 'gz':" + a.gyro.z + "}";
        Bluetooth.println(s);
      }
      idleTimeout = setTimeout(function() {
        idleTimeout = undefined;
        LED.reset();
      },500);  
    });
    

    It certainly reports numbers, but they don't seem to bear much relationship to the magnitude of the movement. A small tap on the table produces : {'type': 'M', 'x':-644, 'y':133, 'z':14235, 'gx': -675, 'gy':-2386, 'gz':1043} and a major movement produces : {'type': 'M', 'x':2926, 'y':402, 'z':19069, 'gx': -675, 'gy':-2386, 'gz':1043}

    what are the units?

    TIA

    Martin

About

Avatar for maby @maby started