Avatar for BrianH

BrianH

Member since Oct 2020 • Last active Oct 2020
  • 1 conversations
  • 2 comments

Most recent activity

  • in Puck.js, Pixl.js and MDBT42
    Avatar for BrianH

    Thanks for the tip regarding the battery charge. However, E.getBattery() returns a value of 100. I actually have the Puck wired to two new 1.5v AAA batteries.

    Unfortunately, using the puckjsv2-accel-movement.js module also returns the same unpredictable results.

  • in Puck.js, Pixl.js and MDBT42
    Avatar for BrianH

    Hi Everybody,

    I've just recently begun working with the Puck.js v2 board. I updated the firmware to "espruino_2v07" immediately after powering it up. I'm starting a project hoping to count revolutions on a rotating spindle with the Puck's onboard LSM6DS3TR-C. Two questions:

    1) Is counting revolutions this way even possible (versus using a more traditional optical encoder or magnetic sensor approach)?

    2) When I manually execute "Puck.accel();" in the command line repeatedly (without moving the sensor at all), I get a huge range of output. Why is "Puck.accel();" returning such a variation in values?

    Sometimes I'll just get a dead response and have to cycle the power to fix:

    >Puck.accel()
    ={
      acc: { x: -16056, y: -5125, z: -151 },
      gyro: { x: 0, y: 0, z: 0 }
     }
    >Puck.accel()
    ={
      acc: { x: -16056, y: -5125, z: -151 },
      gyro: { x: 0, y: 0, z: 0 }
     }
    >Puck.accel()
    ={
      acc: { x: -16056, y: -5125, z: -151 },
      gyro: { x: 0, y: 0, z: 0 }
     }
    

    And sometimes the gyro output seems totally random (without physically moving the Puck at all):

    >Puck.accel()
    ={
      acc: { x: -8001, y: 2134, z: 107 },
      gyro: { x: 200, y: -9329, z: -14452 }
     }
    >Puck.accel()
    ={
      acc: { x: -7988, y: 2153, z: 101 },
      gyro: { x: -949, y: -5207, z: -12287 }
     }
    >Puck.accel()
    ={
      acc: { x: -7973, y: 2136, z: 115 },
      gyro: { x: -1532, y: -5256, z: -12355 }
     }
    >Puck.accel()
    ={
      acc: { x: -8023, y: 2158, z: 123 },
      gyro: { x: -4909, y: -13612, z: -11337 }
     }
    

    Thanks!

Actions