You are reading a single comment by @ClearMemory041063 and its replies. Click here to read the full conversation.
  • I’m starting work on an I2C driver for the Sparkfun 9DoF Sensor Stick
    https://www.sparkfun.com/products/13944
    3-axis Magnetometer, Gyro and Accelerometer.
    As a starting point I’ve downloaded the Arduino Library from
    https://github.com/sparkfun/SparkFun_LSM­9DS1_Arduino_Library
    I’ve edited the LSM9DS1_register.h header file changing the #define to a variable object.

    I looked at some existing modules and found an interesting comment in this one.
    https://www.espruino.com/modules/ADS1X15­.js
    The comment:

    /* Register values. Most of these aren't used
    and this is hidden, so it'll get optimised out
    when minified */
    var CONFIG = {
    OS_MASK      : (0x8000),
    OS_SINGLE    : (0x8000),  // Write: Set to start a single-conversion
    OS_BUSY      : (0x0000),  // Read: Bit = 0 when conversion is in progress
    OS_NOTBUSY   : (0x8000),  // Read: Bit = 1 when device is not performing a conversion
    

    What minification settings are used to make this trick work?

About