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

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
SW10.init

init(self)

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

SW10.getTempC

getTempC(self)

Returns the ambient temerature in degree celcius.

SW10.getTempF

getTempF(self)

Returns the ambient temerature in degree fahrenheit.

SW10.readTemperature

readTemperature(self)

Reads the raw temperature from LM75.

returns the raw temperature.