A driver for interacting with the mcp9808 Temperature Sensor using I2C. More...
Classes | |
| class | mcp9808.TempSensor |
| A Driver for the mcp9808 temperature sensor. More... | |
Functions | |
| def | mcp9808.print_temp (_) |
| def | mcp9808.print_for_minute (timer) |
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. | |
| mcp9808.temp_sensor = TempSensor() | |
| mcp9808.epoch = utime.ticks_ms() | |
| mcp9808.my_timer = Timer(2, freq=1, callback=print_for_minute) | |
A driver for interacting with the mcp9808 Temperature Sensor using I2C.
If this module is run directly, it will run a test script which prints the current temperature to the console once every second for one minute.