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

    Variable sht3xConst

    sht3x: {
        addressA: number;
        addressB: number;
        command: {
            break: number;
            clearStatus: number;
            fetchData: number;
            generalCallReset: number;
            heaterDisable: number;
            heaterEnable: number;
            periodicArt: number;
            periodicFourMpsHigh: number;
            periodicFourMpsLow: number;
            periodicFourMpsMedium: number;
            periodicHalfMpsHigh: number;
            periodicHalfMpsLow: number;
            periodicHalfMpsMedium: number;
            periodicOneMpsHigh: number;
            periodicOneMpsLow: number;
            periodicOneMpsMedium: number;
            periodicTenMpsHigh: number;
            periodicTenMpsLow: number;
            periodicTenMpsMedium: number;
            periodicTwoMpsHigh: number;
            periodicTwoMpsLow: number;
            periodicTwoMpsMedium: number;
            readStatus: number;
            singleShotHigh: number;
            singleShotHighStretch: number;
            singleShotLow: number;
            singleShotLowStretch: number;
            singleShotMedium: number;
            singleShotMediumStretch: number;
            softReset: number;
        };
        minCommandGapMicros: number;
        statusDefault: number;
        celsius(raw: number): number;
        crc(data: Uint8Array): number;
        fahrenheit(raw: number): number;
        humidityRawFromMilliPercent(milliPercent: number): number;
        humidityRawFromRelativeHumidity(percent: number): number;
        intervalMicros(rate: Sht3xRate): number;
        maxMeasurementMicros(repeatability: Sht3xRepeatability): number;
        measurementBytes(temperatureRaw: number, humidityRaw: number): Buffer;
        milliCelsius(raw: number): number;
        milliFahrenheit(raw: number): number;
        milliPercent(raw: number): number;
        parseMeasurement(bytes: Uint8Array): sensors.Sht3xMeasurement;
        parseStatus(bytes: Uint8Array): sensors.Sht3xStatus;
        periodic(repeatability: Sht3xRepeatability, rate: Sht3xRate): number;
        relativeHumidity(raw: number): number;
        singleShot(
            repeatability: Sht3xRepeatability,
            clockStretching: boolean,
        ): number;
        statusBytes(bits: number): Buffer;
        statusFromBits(bits: number): sensors.Sht3xStatus;
        temperatureRawFromCelsius(celsius: number): number;
        temperatureRawFromMilliCelsius(milliCelsius: number): number;
        temperatureRawFromMilliFahrenheit(milliFahrenheit: number): number;
        typicalMeasurementMicros(repeatability: Sht3xRepeatability): number;
        word(frame: Uint8Array): number;
        wordBytes(value: number): Buffer;
    }

    A Sensirion SHT3x humidity and temperature sensor.

    Type Declaration

    • addressA: number

      The address the part answers on with its ADDR pin low.

    • addressB: number

      The address it answers on with ADDR high.

    • command: {
          break: number;
          clearStatus: number;
          fetchData: number;
          generalCallReset: number;
          heaterDisable: number;
          heaterEnable: number;
          periodicArt: number;
          periodicFourMpsHigh: number;
          periodicFourMpsLow: number;
          periodicFourMpsMedium: number;
          periodicHalfMpsHigh: number;
          periodicHalfMpsLow: number;
          periodicHalfMpsMedium: number;
          periodicOneMpsHigh: number;
          periodicOneMpsLow: number;
          periodicOneMpsMedium: number;
          periodicTenMpsHigh: number;
          periodicTenMpsLow: number;
          periodicTenMpsMedium: number;
          periodicTwoMpsHigh: number;
          periodicTwoMpsLow: number;
          periodicTwoMpsMedium: number;
          readStatus: number;
          singleShotHigh: number;
          singleShotHighStretch: number;
          singleShotLow: number;
          singleShotLowStretch: number;
          singleShotMedium: number;
          singleShotMediumStretch: number;
          softReset: number;
      }

      The command words a driver writes.

      • break: number

        Leave periodic mode.

      • clearStatus: number

        Clear the status register.

      • fetchData: number

        Fetch the latest periodic result.

      • generalCallReset: number

        The general-call reset, addressed to 0x00.

      • heaterDisable: number

        Turn the on-die heater off.

      • heaterEnable: number

        Turn the on-die heater on.

      • periodicArt: number

        Accelerated response time, four measurements per second.

      • periodicFourMpsHigh: number

        Periodic at four measurements per second, high repeatability.

      • periodicFourMpsLow: number

        Periodic at four measurements per second, low repeatability.

      • periodicFourMpsMedium: number

        Periodic at four measurements per second, medium repeatability.

      • periodicHalfMpsHigh: number

        Periodic at one measurement every two seconds, high repeatability.

      • periodicHalfMpsLow: number

        Periodic at one measurement every two seconds, low repeatability.

      • periodicHalfMpsMedium: number

        Periodic at one measurement every two seconds, medium repeatability.

      • periodicOneMpsHigh: number

        Periodic at one measurement per second, high repeatability.

      • periodicOneMpsLow: number

        Periodic at one measurement per second, low repeatability.

      • periodicOneMpsMedium: number

        Periodic at one measurement per second, medium repeatability.

      • periodicTenMpsHigh: number

        Periodic at ten measurements per second, high repeatability.

      • periodicTenMpsLow: number

        Periodic at ten measurements per second, low repeatability.

      • periodicTenMpsMedium: number

        Periodic at ten measurements per second, medium repeatability.

      • periodicTwoMpsHigh: number

        Periodic at two measurements per second, high repeatability.

      • periodicTwoMpsLow: number

        Periodic at two measurements per second, low repeatability.

      • periodicTwoMpsMedium: number

        Periodic at two measurements per second, medium repeatability.

      • readStatus: number

        Read the status register.

      • singleShotHigh: number

        Single shot, high repeatability, polled rather than stretched.

      • singleShotHighStretch: number

        Single shot, high repeatability, holding the clock until the result is ready.

      • singleShotLow: number

        Single shot, low repeatability, polled.

      • singleShotLowStretch: number

        Single shot, low repeatability, with clock stretching.

      • singleShotMedium: number

        Single shot, medium repeatability, polled.

      • singleShotMediumStretch: number

        Single shot, medium repeatability, with clock stretching.

      • softReset: number

        Soft reset.

    • minCommandGapMicros: number

      The shortest gap the datasheet allows between two commands, in microseconds.

    • statusDefault: number

      The status word the part powers up with.

    • celsius: function
      • Converts a raw temperature word to degrees Celsius.

        Parameters

        • raw: number

          The 16-bit word.

        Returns number

        The temperature.

    • crc: function
      • Computes the Sensirion CRC-8 the part appends to every word.

        Parameters

        • data: Uint8Array

          The bytes the checksum covers.

        Returns number

        The checksum.

    • fahrenheit: function
      • Converts a raw temperature word to degrees Fahrenheit.

        Parameters

        • raw: number

          The 16-bit word.

        Returns number

        The temperature.

    • humidityRawFromMilliPercent: function
      • Builds the raw humidity word for a humidity in milli-percent.

        Parameters

        • milliPercent: number

          The relative humidity.

        Returns number

        The 16-bit word, clamped to the part's range.

    • humidityRawFromRelativeHumidity: function
      • Builds the raw humidity word for a relative humidity percentage.

        Parameters

        • percent: number

          The relative humidity.

        Returns number

        The 16-bit word, clamped to the part's range.

    • intervalMicros: function
      • Returns the interval between periodic measurements.

        Parameters

        Returns number

        The interval in microseconds.

    • maxMeasurementMicros: function
      • Returns how long a measurement may take.

        Parameters

        Returns number

        The datasheet's worst case, in microseconds.

    • measurementBytes: function
      • Builds the six bytes the part sends for a pair of raw words.

        The inverse of parseMeasurement.

        Parameters

        • temperatureRaw: number

          The raw temperature word.

        • humidityRaw: number

          The raw humidity word.

        Returns Buffer

        The frame, each word followed by its CRC.

    • milliCelsius: function
      • Converts a raw temperature word to milli-degrees Celsius.

        Parameters

        • raw: number

          The 16-bit word.

        Returns number

        The temperature, exact in integer arithmetic.

    • milliFahrenheit: function
      • Converts a raw temperature word to milli-degrees Fahrenheit.

        Parameters

        • raw: number

          The 16-bit word.

        Returns number

        The temperature, exact in integer arithmetic.

    • milliPercent: function
      • Converts a raw humidity word to milli-percent relative humidity.

        Parameters

        • raw: number

          The 16-bit word.

        Returns number

        The humidity, exact in integer arithmetic.

    • parseMeasurement: function
      • Parses and CRC-checks a six-byte measurement frame.

        Parameters

        • bytes: Uint8Array

          The frame as the device sent it, each word followed by its CRC.

        Returns sensors.Sht3xMeasurement

        The raw words and the physical values they carry.

        If either checksum does not match.

    • parseStatus: function
      • Parses and CRC-checks a three-byte status frame.

        Parameters

        • bytes: Uint8Array

          The status word and its checksum.

        Returns sensors.Sht3xStatus

        The status word and its flags.

        If the checksum does not match.

    • periodic: function
      • Returns the command word that starts periodic measurement.

        Parameters

        Returns number

        The command word.

    • relativeHumidity: function
      • Converts a raw humidity word to a relative humidity percentage.

        Parameters

        • raw: number

          The 16-bit word.

        Returns number

        The humidity.

    • singleShot: function
      • Returns the command word for a single-shot measurement.

        Parameters

        • repeatability: Sht3xRepeatability

          How much the part should average.

        • clockStretching: boolean

          Whether the part holds the clock until the result is ready, rather than answering a poll with a NACK.

        Returns number

        The command word.

    • statusBytes: function
      • Builds the three bytes the part sends for a status word.

        Parameters

        • bits: number

          The status register.

        Returns Buffer

        The word and its checksum.

    • statusFromBits: function
      • Splits a status word into its flags.

        Parameters

        • bits: number

          The status register, as read from the device.

        Returns sensors.Sht3xStatus

        The flags the word carries.

    • temperatureRawFromCelsius: function
      • Builds the raw temperature word for a temperature in degrees Celsius.

        Parameters

        • celsius: number

          The temperature.

        Returns number

        The 16-bit word, clamped to the part's range.

    • temperatureRawFromMilliCelsius: function
      • Builds the raw temperature word for a temperature in milli-degrees Celsius.

        Parameters

        • milliCelsius: number

          The temperature.

        Returns number

        The 16-bit word, clamped to the part's range.

    • temperatureRawFromMilliFahrenheit: function
      • Builds the raw temperature word for a temperature in milli-degrees Fahrenheit.

        Parameters

        • milliFahrenheit: number

          The temperature.

        Returns number

        The 16-bit word, clamped to the part's range.

    • typicalMeasurementMicros: function
      • Returns how long a measurement typically takes.

        Parameters

        Returns number

        The datasheet's typical case, in microseconds.

    • word: function
      • Reads a CRC-checked word off the bus.

        Parameters

        • frame: Uint8Array

          The two data bytes and their checksum.

        Returns number

        The word.

        If the checksum does not match, which means the read was corrupted on the bus and should be repeated.

    • wordBytes: function
      • Builds the three bytes the part sends for a word, its checksum last.

        Parameters

        • value: number

          The word.

        Returns Buffer

        The two data bytes and their checksum.