SU02 Module

This is a Module for the SU02 digital input. The xChip is based on the ADC081C021 analogue to digital converter manufactured by Texas Instruments. The board uses I2C for communication.

Data Sheets:

SU02 class

class SU02(self, drvname, addr=0x55, clk=100000)

Create an instance of the SU02 class.

  • drvname – I2C Bus used ‘( I2C0, ... )’
  • addr – Slave address, default 0x55
  • clk – Clock speed, default 100kHz

Configures the registers of ADC081C021. Call after instantiation of the class. Exception raised if unsuccessful


Reads the state of the input.

Returns False for Open and True for closed.


Reads the voltage on the input.

Returns the voltage.