Class: AnInput

AnInput

Provides methods and properties for accessing an analog input.


Members


offset :number

The offset value for calulating scaledValue.

Type:
  • number
Since:
  • 1.0 (WAT 1.0)

<readonly> rawValue :number

The raw, untranslated value from the ADC. Range is [0, 4095]

Type:
  • number
Since:
  • 1.0 (WAT 1.0)

scale :number

The scale value for calulating scaledValue.

Type:
  • number
Since:
  • 1.0 (WAT 1.0)

<readonly> scaledValue :number

The value, scaled using scale, and offset using offset. The same as (anInput.rawValue * anInput.scale) + anInput.offset.

Type:
  • number
Since:
  • 1.0 (WAT 1.0)

Methods


configureForAmps()

Sets scale and offset so scaledValue is in Amps.

Since:
  • 1.0 (WAT 1.0)

configureForMAmps()

Sets scale and offset so scaledValue is in mAmps.

Since:
  • 1.0 (WAT 1.0)

configureForVolts()

Sets scale and offset so scaledValue is in Volts.

Since:
  • 1.0 (WAT 1.0)