Skip to content

SW10 Module

This is a Module for the SW10 xChip ambient temperature sensor. The board is based off the LM75 temperature-to-digital converter manufactured by NXP Semiconductors. The board uses I2C for communication.

Data Sheets:

SW10 class

class SW10(self, drvname, addr=0x48, clk=100000)

Create an instance of the SW10 class.

Arguments:

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

init(self)

Empty function. Only used to conform with other modules. No configuartion required for LM75.

getTempC(self)

Returns the ambient temerature in degree celcius.

getTempF(self)

Returns the ambient temerature in degree fahrenheit.

readTemperature(self)

Reads the raw temperature from LM75.

returns the raw temperature.