iblrig.scale.Scale

Inheritance diagram of Scale

class iblrig.scale.Scale[source]
__init__(*args, **kwargs)[source]
assert_setting(query, expected_response=b'OK!', do_raise=True)[source]
Parameters:
  • query (str)

  • expected_response (str)

  • do_raise (bool)

Return type:

bool

get_grams()[source]

Obtain weight reading in grams and stability indicator.

Returns:

  • float – Weight reading in grams

  • bool – Stability indicator: True if scale is stable, False if not

Return type:

tuple[float, bool]

get_stable_grams()[source]

Blocking function that will only return a weight reading once the scale is stable.

Returns:

Stable weight reading (grams)

Return type:

float

query_line(query)[source]
Parameters:

query (str)

Return type:

bytes

tare()[source]
Return type:

bool

zero()[source]
Return type:

bool

property grams: float