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

    Variable ina219Const

    ina219: {
        busMillivolts(raw: number): number;
        busRegister(millivolts: number): number;
        calibration(currentLsbMicroamps: number, shuntMilliohms: number): number;
        conversionReady(raw: number): boolean;
        currentMicroamps(raw: number, currentLsbMicroamps: number): number;
        currentRegister(microamps: number, currentLsbMicroamps: number): number;
        mathOverflow(raw: number): boolean;
        minimumCurrentLsbMicroamps(maxExpectedMicroamps: number): number;
        powerMicrowatts(raw: number, currentLsbMicroamps: number): number;
        powerRegister(microwatts: number, currentLsbMicroamps: number): number;
        shuntMicrovolts(raw: number): number;
        shuntRegister(microvolts: number): number;
    }

    A TI INA219 current, voltage, and power monitor.

    Type Declaration

    • busMillivolts: function
      • Converts a raw bus-voltage register to millivolts.

        Parameters

        • raw: number

          The register value.

        Returns number

        The bus voltage.

    • busRegister: function
      • Builds the bus-voltage register a monitor reports for a bus voltage.

        Parameters

        • millivolts: number

          The bus voltage in millivolts.

        Returns number

        The register value, with the conversion-ready flag set.

    • calibration: function
      • Computes the calibration register for a shunt and current resolution.

        Parameters

        • currentLsbMicroamps: number

          The microamps per count the current register should carry.

        • shuntMilliohms: number

          The shunt resistor value.

        Returns number

        The register value to write.

    • conversionReady: function
      • Reports whether a bus-voltage register says a conversion is ready.

        Parameters

        • raw: number

          The register value.

        Returns boolean

        Whether the conversion-ready flag is set.

    • currentMicroamps: function
      • Converts a raw current register to microamps.

        Parameters

        • raw: number

          The signed register value.

        • currentLsbMicroamps: number

          The resolution the calibration selected.

        Returns number

        The current.

    • currentRegister: function
      • Builds the current register a monitor reports for a current.

        Parameters

        • microamps: number

          The current in microamps.

        • currentLsbMicroamps: number

          The current LSB the calibration was set for.

        Returns number

        The signed register value.

    • mathOverflow: function
      • Reports whether a bus-voltage register flags a math overflow.

        Parameters

        • raw: number

          The register value.

        Returns boolean

        Whether the current and power readings are meaningless, which means the calibration needs revisiting.

    • minimumCurrentLsbMicroamps: function
      • Returns the smallest current resolution that still covers a maximum.

        Parameters

        • maxExpectedMicroamps: number

          The largest current the application measures.

        Returns number

        The minimum current LSB in microamps.

    • powerMicrowatts: function
      • Converts a raw power register to microwatts.

        Parameters

        • raw: number

          The register value.

        • currentLsbMicroamps: number

          The resolution the calibration selected.

        Returns number

        The power. The power LSB is fixed at twenty times the current LSB.

    • powerRegister: function
      • Builds the power register a monitor reports for a power.

        Parameters

        • microwatts: number

          The power in microwatts.

        • currentLsbMicroamps: number

          The current LSB the calibration was set for.

        Returns number

        The register value.

    • shuntMicrovolts: function
      • Parameters

        • raw: number

        Returns number

    • shuntRegister: function
      • Builds the shunt-voltage register a monitor reports for a shunt voltage.

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

        Parameters

        • microvolts: number

          The shunt voltage in microvolts.

        Returns number

        The signed register value, at 10 uV per count.