API Reference

# Class Functions

# begin

Starts the device. You can optionally pass a non-default I2C address. You would use this if you have changed the I2C address to have more than one device connected at a time. You can also optionally pass the Wire instance to use. You might use this to have multiple I2C busses at a time, with different devices on each. You need to call Wire.begin() prior to calling this. ::begin is not implemented in the Python implementation.

Parameters

The function can be overloaded with the following parameters:

  • i2c_address the address of the device (default is 0x3C).
  • wirePort the wire instance to use.

Usage

:::code

uFire_ISE::begin();
uFire_ISE::begin(uint8_t i2c_address);
uFire_ISE::begin(uint8_t i2c_address, TwoWire &wirePort);

:::

:::code

// begin using default 0x3C address and default `Wire` instance
uFire_ISE::begin()

// begin using an alternate I2C address
uFire_ISE::begin(0x3D)

// begin by passing I2C address and Wire port
uFire_ISE::begin(0x3C, Wire1)

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mv;

Wire.begin()
mv.begin();
mv.begin(0x3f);
mv.begin(0x3f, Wire1);

:::

Related

Returns

true if successful, false otherwise


# measuremV

Starts a mV measurement.

Usage

::: code

uFire_ISE::measuremV();
uFire_ISE.measuremV()
mv

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mV;

mV.measuremV();
from uFire_ISE import uFire_ISE
mv = uFire_ISE()

mv.measuremV()

:::

Related

Returns

the measured result in mV, or -1 on error


# measureTemp

Starts a temperature measurement.

Usage

::: code

uFire_ISE::measureTemp();
uFire_ISE.measureTemp()
temp

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mV;

mV.measureTemp();
from uFire_ISE import uFire_ISE
mv = uFire_ISE()

mv.measureTemp()

:::

Related

Returns

temperature in C

ALSO...

Class variables tempC and tempF are updated

WARNING

A value of -127 means the temperature sensor is not connected.


# calibrateSingle

Calibrates the probe using a single point using a mV value.

Usage

::: code

uFire_ISE::calibrateSingle(200);
uFire_ISE.calibrateSingle(200)
cal 200

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mV;

float offset = mV.calibrateSingle(200);
from uFire_ISE import uFire_ISE
mv = uFire_ISE()

offset = mv.calibrateSingle(200)

:::

Related

getCalibrateOffset

Returns

calibration offset


# calibrateProbeLow

Calibrates the dual-point values for the low reading, in mV, and saves them in the devices's EEPROM.

Dual point uses two measures for low and high points. It needs the measured value (reading value) and the known value (reference value). Calling calibrateProbeLow saves both the reading and reference value.

When there are high and low calibration points, the device will automatically use them to adjust readings. To disable dual-point adjustment, call reset to remove all calibration data.

Parameters

  • solutionmV the mV of the calibration solution

Usage

::: code

uFire_ISE::calibrateProbeLow(0);
uFire_ISE.calibrateProbeLow(0)
low 0

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mV;

float lowCalibration = mV.calibrateProbeLow(0);
from uFire_ISE import uFire_ISE
mv = uFire_ISE()

lowCalibration = mv.calibrateProbeLow(0)

:::

Related

Returns

dual-point lpow calibration offset


# calibrateProbeHigh

Calibrates the dual-point values for the high reading, in mV, and saves them in the devices's EEPROM.

Dual point uses two measures for low and high points. It needs the measured value (reading value) and the known value (reference value). Calling calibrateProbeHigh saves both the reading and reference value.

When there are high and low calibration points, the device will automatically use them to adjust readings. To disable dual-point adjustment, call reset to remove all calibration data.

Parameters

  • solutionmV the mV of the calibration solution

Usage

::: code

uFire_ISE::calibrateProbeHigh(600);
uFire_ISE.calibrateProbeHigh(600)
high 600

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mV;

float highCalibration = mV.calibrateProbeHigh(600);
from uFire_ISE import uFire_ISE
mv = uFire_ISE()

highCalibration = mv.calibrateProbeHigh(600)

:::

Related

Returns

dual-point high calibration offset


# setDualPointCalibration

Sets all the values, in mV, for dual point calibration and saves them in the devices's EEPROM.

# Parameters

  • refLow the reference low point
  • refHigh the reference high point
  • readLow the measured low point
  • readHigh the measured high point

Usage

::: code

uFire_ISE::setDualPointCalibration(0, 200, 3, 230);
uFire_ISE.setDualPointCalibration(0, 200, 3, 230)

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mV;

mV.setDualPointCalibration(0, 200, 3, 230);
from uFire_ISE import uFire_ISE
mv = uFire_ISE()

mv.setDualPointCalibration(0, 200, 3, 230)

:::

Related

Returns

none


# setBlocking

The library uses delay to wait for the device to finish taking the measurement. To have all calls that use delay immediatly return, you can use this call by passing false. measuremV, measureTemp, calibrateProbe, calibrateProbeLow, and calibrateProbeHigh will all return immediately. To get updated readings, you will need to call readData. For firmware version 1 and 2, an EC reading (and calibrations) takes 750 ms and a temperature reading takes 750 ms. For firmware version 3, an EC reading takes 500 ms and a temperature reading takes 750 ms.

# Parameters

  • bool true/false to use blocking

Usage

::: code

uFire_ISE::setBlocking(bool blocking);
mv.setBlocking(bool blocking)

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mV;

mV.setBlocking(false);
mV.measuremV();
// continue program immediately
mV.readData();
float mv = mV.mV;
from uFire_ISE import uFire_ISE
mv = uFire_ISE()

mv.setBlocking(False)
mv.measureEC()
# continue program immediately
mv.readData()
float mV = mv.mV

:::

Related

Returns

none

# getBlocking

Determines if the library is set to use blocking calls instead of returning immediately. Refer to setBlocking for more details.

# Parameters

none

Usage

::: code

bool blocking = uFire_ISE::getBlocking();
bool blocking = mv.setBlocking()

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mV;

bool blocking = mv.getBlocking();
from uFire_ISE import uFire_ISE
mv = uFire_ISE()

blocking = mv.getBlocking()

:::

Related

Returns

none

# readData

Reads all the meausurement data. This is used in conjunction with setBlocking which makes all calls that delay return immediately.

# Parameters

none

Usage

::: code

uFire_ISE::readData();
mv.readData()

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mv;

mv.readData();
float ms = uFire_ISE::mV;

from uFire_ISE import uFire_ISE
mv = uFire_ISE() 

mv.readData()
mV = mv.mV

:::

Related

Returns

none


# getCalibrateOffset

Returns the single-point offset from the device.

Usage

::: code

uFire_ISE::getCalibrateOffset();
uFire_ISE.getCalibrateOffset()
cal

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mV;

mV.getCalibrateOffset();
from uFire_ISE import uFire_ISE
mv = uFire_ISE()

mv.getCalibrateOffset()

:::

Related

Returns

the offset in mV

TIP

If there is no calibration information NaN is returned. You can check for a NaN by #include <math.h> and using isnan(). It returns true if the return result is NaN.


# setTemp

Sets the temperature used by the device without using the attached temperature sensor.

# Parameters

  • float tempC

Usage

::: code

uFire_ISE::setTemp(tempC);
mv.setTemp(tempC)
tc tempC

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mv;

mv.setTemp(20.2);
from uFire_ISE import uFire_ISE
mv = uFire_ISE()

mv.setTemp(20.2)

:::

Returns

none


# getCalibrateHighReading

Returns the dual-point calibration high-reading value.

Usage

::: code

uFire_ISE::getCalibrateHighReading();
uFire_ISE.getCalibrateHighReading()
high

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mV;

mV.getCalibrateHighReading();
from uFire_ISE import uFire_ISE
mv = uFire_ISE()

mv.getCalibrateHighReading()

:::

Related

Returns

the dual-point calibration high-reading value

TIP

If there is no calibration information NaN is returned. You can check for a NaN by #include <math.h> and using isnan(). It returns true if the return result is NaN.


# getCalibrateHighReference

Returns the dual-point calibration high-reference value.

Usage

::: code

uFire_ISE::getCalibrateHighReference();
uFire_ISE.getCalibrateHighReference()
high

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mV;

mV.getCalibrateHighReference();
from uFire_ISE import uFire_ISE
mv = uFire_ISE()

mv.getCalibrateHighReference()

:::

Related

Returns

the dual-point calibration high-reference value

TIP

If there is no calibration information NaN is returned. You can check for a NaN by #include <math.h> and using isnan(). It returns true if the return result is NaN.


# getCalibrateLowReading

Returns the dual-point calibration low-reading value.

Usage

::: code

uFire_ISE::getCalibrateLowReading();
uFire_ISE.getCalibrateLowReading()
low

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mV;

mV.getCalibrateLowReading();
from uFire_ISE import uFire_ISE
mv = uFire_ISE()

mv.getCalibrateLowReading()

:::

Related

Returns

the dual-point calibration low-reading value

TIP

If there is no calibration information NaN is returned. You can check for a NaN by #include <math.h> and using isnan(). It returns true if the return result is NaN.


# getCalibrateLowReference

Returns the dual-point calibration low-reference value.

Usage

::: code

uFire_ISE::getCalibrateLowReference();
uFire_ISE.getCalibrateLowReference()
low

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mV;

mV.getCalibrateLowReference();
from uFire_ISE import uFire_ISE
mv = uFire_ISE()

mv.getCalibrateLowReference()

:::

Related

Returns

the dual-point calibration low-reference value

TIP

If there is no calibration information NaN is returned. You can check for a NaN by #include <math.h> and using isnan(). It returns true if the return result is NaN.


# getVersion

Returns the firmware version of the device.

Usage

::: code

uFire_ISE::getVersion();
uFire_ISE.getVersion()
version

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mV;

mV.getVersion();
from uFire_ISE import uFire_ISE
mv = uFire_ISE()

mv.getVersion()

:::

Returns

version of firmware


# setI2CAddress

Changes the default I2C address.

Usage

::: code

uFire_ISE::setI2CAddress(59);
uFire_ISE.setI2CAddress(59)
i2c 59

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mV;

mV.setI2CAddress(59);
from uFire_ISE import uFire_ISE
mv = uFire_ISE()

mv.setI2CAddress(59)

:::

Returns

none


# reset

Resets all the stored calibration information.

Usage

::: code

uFire_ISE::reset();
uFire_ISE.reset()
reset

:::

Example

::: code

#include <uFire_ISE.h>
uFire_ISE mV;

mV.reset();
from uFire_ISE import uFire_ISE
mv = uFire_ISE()

mv.reset()

:::

Returns

none