You are reading a single comment by @trusktr and its replies. Click here to read the full conversation.
  • I got an MPU6050, and I connected the wires based on what the doc for the module says. When I run my code, it seems like Espruino freezes (the command line in the IDE becomes unresponsive).

    Maybe I didn't connect the wires properly? I am using wires but no solder (see photo, the module is on bottom, the pins are fastened with the wires but not soldered). Maybe it really needs solder?

    Or if that should be good enough for prototyping, maybe there's something wrong in code or with the module? Here's my code:

    I2C1.setup({scl:B6,sda:B7});
    
    var MPU6050 = require("MPU6050");
    console.log(MPU6050);
    
    var mpu = MPU6050.connect(I2C1);
    
    setInterval(() => {
      console.log(
        '\nAcceleration:', mpu.getAcceleration(), // returns an [x,y,z] array with raw accl. data
        '\nGravity:', mpu.getGravity(),  // returns acceleration array in G's
        '\nRotation:', mpu.getRotation(), // returns an [x,y,z] array with raw gyro data
        '\nDegress per second:', mpu.getDegreesPerSecond() // returns gyro array in degrees/s
      );
    }, 1000);
    

    What are some steps I can take to diagnose the problem?


    1 Attachment

    • IMG_20170517_224505.jpg
About

Avatar for trusktr @trusktr started