Mechatronics
Documentation for ME 405 labs
Lab0x04

Files

file  core_temp.py
 Quick script to log the board internal temperature to a file (on the Nucleo).
 
file  generate_plot.py
 A simple tool to plot temperatures and times collected from the Nucleo and mcp9808 temperature sensor.
 
file  main.py
 Log I2C sensor and core temperature values once a minute until stopped.
 
file  mcp9808.py
 A driver for interacting with the mcp9808 Temperature Sensor using I2C.
 

Classes

class  mcp9808.TempSensor
 A Driver for the mcp9808 temperature sensor. More...
 

Variables

int mcp9808.BUS_ADDRESS = 0b0011000
 I2C bus address of MCP9808. More...
 
int mcp9808.TA_REGISTER = 0b0101
 Temperature measurement register.
 
int mcp9808.ID_REGISTER = 0b0110
 Manufacturer ID register. More...
 
int mcp9808.MANUFACTURER_ID = 0b01010100
 Temperature measurement register.
 

Detailed Description

Variable Documentation

◆ BUS_ADDRESS

int mcp9808.BUS_ADDRESS = 0b0011000

I2C bus address of MCP9808.

Assume that A0-A2 are tied to ground.

◆ ID_REGISTER

int mcp9808.ID_REGISTER = 0b0110

Manufacturer ID register.

This Register should contain the number 0b01010100