You are reading a single comment by @DrAzzy and its replies. Click here to read the full conversation.
  • Uh?

    If you're talking about the mpu6050, that function returns an array with three members.

    (this code isn't tested, ofc - I don't have that part)

    var mpu=require("MPU6050").connect();
    var t = mpu.getDegreesPerSecond();
    if (t[1] > some_number ) { //t[1] is the second member of the array, hence Y axis
    console.log("Wheee! y rotation rate is "+t[1].toString());
    } else { 
    console.log("Booo! y rotation rate is only "+t[1].toString());
    }
    
About

Avatar for DrAzzy @DrAzzy started