pamoja for TypeScript - v0.1.17
    Preparing search index...

    Variable bmp280Const

    bmp280: {
        addressPrimary: number;
        addressSecondary: number;
        calibrationLength: number;
        chipId: number;
        dataLength: number;
        register: {
            calibration: number;
            chipId: number;
            config: number;
            ctrlMeas: number;
            data: number;
            reset: number;
            status: number;
        };
        resetWord: number;
        skippedOutput: number;
        calibration(bytes: Uint8Array): Bmp280Calibration;
        configBits(config: Bmp280Config): number;
        configFromBits(bits: number): Bmp280Config;
        ctrlMeasBits(ctrl: Bmp280CtrlMeas): number;
        ctrlMeasFromBits(bits: number): Bmp280CtrlMeas;
        imageUpdating(status: number): boolean;
        measurementBytes(pressure: number, temperature: number): Buffer;
        measuring(status: number): boolean;
        oversamplingFactor(code: number): number;
        parseMeasurement(bytes: Uint8Array): Bmp280RawMeasurement;
        pressureSkipped(pressure: number): boolean;
        standbyMicros(code: number): number;
        temperatureSkipped(temperature: number): boolean;
    } = ...

    A Bosch BMP280 pressure and temperature sensor, the BME280 without humidity.

    Type Declaration

    • addressPrimary: number

      The address a BMP280 answers on with its SDO pin low.

    • addressSecondary: number

      The address it answers on with SDO high.

    • calibrationLength: number

      How many bytes the calibration block holds.

    • chipId: number

      The value its chip-ID register reads, which confirms the part.

    • dataLength: number

      How many bytes one measurement burst holds.

    • register: {
          calibration: number;
          chipId: number;
          config: number;
          ctrlMeas: number;
          data: number;
          reset: number;
          status: number;
      }

      The registers a driver reads and writes.

      • calibration: number

        The first of the 24 calibration bytes.

      • chipId: number

        The chip-ID register.

      • config: number

        The configuration register.

      • ctrlMeas: number

        The measurement-control register.

      • data: number

        The first of the six data bytes.

      • reset: number

        The reset register.

      • status: number

        The status register.

    • resetWord: number

      The word written to the reset register to restart the part.

    • skippedOutput: number

      The raw output a channel reports when its measurement is switched off.

    • calibration: function
      • Reads the factory calibration out of the registers, once at start-up.

        Parameters

        • bytes: Uint8Array

          The 24-byte calibration block.

        Returns Bmp280Calibration

        The calibration, to reuse for every measurement.

        If the block is the wrong length.

    • configBits: function
    • configFromBits: function
    • ctrlMeasBits: function
    • ctrlMeasFromBits: function
    • imageUpdating: function
      • Reports whether a status register says the calibration is being copied.

        Parameters

        • status: number

          The status register.

        Returns boolean

        Whether the image registers are being reloaded.

    • measurementBytes: function
      • Builds the six data-register bytes a part reports for two raw outputs.

        The inverse of parseMeasurement, so a node can be written and tested against what a sensor sends without one attached.

        Parameters

        • pressure: number

          The 20-bit uncompensated pressure.

        • temperature: number

          The 20-bit uncompensated temperature.

        Returns Buffer

        The six bytes in read order.

    • measuring: function
      • Reports whether a status register says a conversion is running.

        Parameters

        • status: number

          The status register.

        Returns boolean

        Whether a measurement is in progress.

    • oversamplingFactor: function
      • Returns how many samples an oversampling code averages.

        Parameters

        • code: number

          The oversampling code, 0 to 7.

        Returns number

        The sample count, or 0 when the measurement is switched off.

    • parseMeasurement: function
      • Splits a six-byte data read into its two uncompensated outputs.

        Parameters

        • bytes: Uint8Array

          The six data registers in read order.

        Returns Bmp280RawMeasurement

        The raw pressure and temperature, before compensation.

        If the read is the wrong length.

    • pressureSkipped: function
      • Reports whether a raw pressure says the measurement is switched off.

        Parameters

        • pressure: number

          The 20-bit uncompensated pressure.

        Returns boolean

        Whether the channel's oversampling is set to skip.

    • standbyMicros: function
      • Returns the standby time a standby code selects in normal mode.

        Parameters

        • code: number

          The standby code, 0 to 7.

        Returns number

        The standby time in microseconds.

    • temperatureSkipped: function
      • Reports whether a raw temperature says the measurement is switched off.

        Parameters

        • temperature: number

          The 20-bit uncompensated temperature.

        Returns boolean

        Whether the channel's oversampling is set to skip.