def zero_the_scale(hx):
    err = hx.zero()
    if err:
        raise ValueError('Tare is unsuccessful.')
    zero_reading = hx.get_raw_data_mean()
    if zero_reading:
        print('Data subtracted by offset: ', zero_reading)
    else:
        raise ValueError('Invalide zero reading')
def zero_the_scale(hx):
    err = hx.zero()
    if err:
        raise ValueError('Tare is unsuccessful.')
    zero_reading = hx.get_raw_data_mean()
    if zero_reading:
        print('Data subtracted by offset: ', zero_reading)
    else:
        raise ValueError('Invalide zero reading')