NAU7802 - Kelvin bridge sensor

class pyserialsensors.devices.nau7802.NAU7802(*args, **kwargs)[source]

Qwiic Scale driver

begin_calibrate_afe()[source]

Start calibration of analog interface.

Returns

Calibration state

Return type

int

calibrate()[source]

Initiate calibration of analog front end and wait for calibration to finish

Returns

True if successfull, false otherwise.

Return type

bool

check_calibration_status()[source]

Read calibration status

Returns

  • 0 internal calibration

  • 2 Offset calibration

  • 3 Gain calibration

Return type

int

check_exists()[source]

Assert if the sensor exists and is responsive

Returns

True if sensor answered, false otherwise.

Return type

bool

clear_bit(address: int, value: int)[source]

Set register a specific bit in a register to 0

Parameters
  • address (int) – Register address

  • value (int) – bit index

Returns

New register value

Return type

int

get_adc()[source]

Fetch data after conversion cycle has finished :returns: Anlog-Digital-Converter read

get_bit(address: int, bit_number: int)[source]

Read single bit from register defined by address

Parameters
  • address (int) – Register address

  • value (int) – bit index

Returns

bit value

Return type

int

get_data()[source]

Get current measurement values :return: data dictionary

get_data_rdy()[source]

Get data ready state

Returns

True if data is available, false otherwise.

Return type

bool

get_serial_number()[source]

A serial number is not supported by bme280 hence a pseudo identifier is calculated by adding the individual calibration values together

Returns

Pseudo-serial number

Return type

str

initialise(voltage=4.5, sample_rate=320, gain=128)[source]

Initialization procedure when NAU7802 is started # Power up Digital and Analog power supplies # First calibration run # Disable clock # Enable 330pF decoupling capacity # Set sample rate

power_up()[source]

Power up analog and digital circuit

Returns

True if power up was successful, false otherwise.

Return type

bool

prepare_measurement()[source]

Commands that have to be run prior to a measurement

reset()[source]

Reset sensor

Returns

True if sensor has been reset correctly, None otherwise.

Return type

bool

set_bit(address: int, value: int)[source]

Set register a specific bit in a register to 1

Parameters
  • address (int) – Register address

  • value (int) – bit index

Returns

New register value

Return type

int