Kmeter ISO Unit

Supported Products:

KmeterISOUnit

Micropython Example:

import os, sys, io
import M5
from M5 import *
from hardware import *
from unit import KMeterISOUnit
import time


M5.begin()
i2c0 = I2C(0, scl=Pin(1), sda=Pin(2), freq=100000)
kmeter_iso_0 = KMeterISOUnit(i2c0, 0x66)
while True:
    if kmeter_iso_0.is_ready():
        print(kmeter_iso_0.get_thermocouple_temperature(0))
        print(kmeter_iso_0.get_internal_temperature(0))
    time.sleep_ms(250)

UIFLOW2 Example:

example.png

cores3_kmeteriso_example.m5f2

class KMeterISOUnit

Constructors

Import with from unit import KMeterISOUnit.

class KMeterISOUnit(i2c, address=0x66)
Parameters:
  • i2c (object) – the I2C object.

  • address (int) – 0x08 ~ 0x77.

UIFLOW2:

init.png

Methods

KMeterISOUnit.get_thermocouple_temperature(scale=0) → float

Get the temperature of the thermocouple in the KmeterISO Unit. Returns a float value.

scale accepts values of KMeterISOUnit.CELSIUS or KMeterISOUnit.FAHRENHEIT.

UIFLOW2:

get_thermocouple_temperature.png

KMeterISOUnit.get_internal_temperature(scale=0) → float

Get the internal temperature of the KmeterISO Unit. Returns a float value.

scale accepts values of KMeterISOUnit.CELSIUS or KMeterISOUnit.FAHRENHEIT.

UIFLOW2:

get_internal_temperature.png

KMeterISOUnit.is_ready() → bool

Check if the measurement result is ready.

UIFLOW2:

is_ready.png

KMeterISOUnit.get_thermocouple_temperature_string(scale=0) → str

Get the temperature of the thermocouple in the KmeterISO Unit as a string with a sign.

scale accepts values of KMeterISOUnit.CELSIUS or KMeterISOUnit.FAHRENHEIT.

UIFLOW2:

get_thermocouple_temperature_string.png

KMeterISOUnit.get_internal_temperature_string(scale=0) → str

Get the internal temperature of the KmeterISO Unit as a string with a sign.

scale accepts values of KMeterISOUnit.CELSIUS or KMeterISOUnit.FAHRENHEIT.

UIFLOW2:

get_internal_temperature_string.png

KMeterISOUnit.get_device_info(mode) → int

Get the firmware version of the KmeterISO Unit. Returns an integer version number.

Parameters:

mode (int)

int

mode

0xFE

firmware version

0xFF

i2c address

UIFLOW2:

get_device_spec.png

KMeterISOUnit.set_i2c_address(address) → int

Set the i2c address can be changed by the user and this address should be between 0x08 and 0x77.

UIFLOW2:

set_i2c_address.png

Constants

KMeterISOUnit.CELSIUS: int

Celsius scale.

KMeterISOUnit.FAHRENHEIT: int

Fahrenheit scale.