ME405 Portfolio
The following documentation details each step of the ME 405 term project.
mcp9808.mcp9808 Class Reference

mcp9808 is a class used to comntain temperature protocalls. More...

Public Member Functions

def __init__ (self, address)
 This function initializes I2C comminication and inital variables. More...
 
def getTemp (self)
 This function reads temperature bytes from the sensor and stores them as an int.
 
def check (self)
 This function checks returns the state of the I2C communication status.
 
def celsius (self)
 This function converts the results of the getTemp funtion into degrees Celsius.
 
def fahrenheit (self)
 This function converts the results of the getTemp funtion into degrees Fahrenheit.
 

Public Attributes

 address
 Variable containing I2C address of mcp9808.
 
 register
 Varibale containing address of ambient temperature register on the mcp9808 module.
 
 i2c
 
 signMask
 Mask used to extract sign bit from first temperature byte.
 
 tempMask
 Mask used to remove first 3 bytes from T_ambient register bytes.
 

Detailed Description

mcp9808 is a class used to comntain temperature protocalls.

This class initializes I2C communication with the mcp9808 module and contains functions for retreiving temperature data.

Constructor & Destructor Documentation

◆ __init__()

def mcp9808.mcp9808.__init__ (   self,
  address 
)

This function initializes I2C comminication and inital variables.

   @param address  The input address of mcp9808 module. This value is 24 in decimal by default but can be altered using A0, A1, and A2 pins

The documentation for this class was generated from the following file: