|
| def | __init__ (self, i2c, address, manuf_id=0b01010100) |
| | A method to initialize an MCP9808 object. More...
|
| |
|
def | check (self) |
| |
| def | celsius (self) |
| | A method to get the temperature in Celcius from the MCP9808. More...
|
| |
| def | fahrenheit (self) |
| | A method to get the temperature in Fahrenheit from the MCP9808. More...
|
| |
| def | collect (self, sample_time, num_samples, scale='C') |
| | A method to collect a series of temperature readings over time. More...
|
| |
|
|
| i2c |
| | A pyb.I2C object to use for communicating with the MCP9808.
|
| |
|
| addr |
| | The i2c address of the MCP9808 address.
|
| |
|
| id |
| | The manufacturer id of the MCP9808 chip.
|
| |
◆ __init__()
| def me405_lab4.MCP9808.__init__ |
( |
|
self, |
|
|
|
i2c, |
|
|
|
address, |
|
|
|
manuf_id = 0b01010100 |
|
) |
| |
A method to initialize an MCP9808 object.
- Parameters
-
| i2c | A pyb.I2C object to use for communicating with the MCP9808. |
| address | The i2c address of the MCP9808 address. |
| manuf_id | The manufacturer id of the MCP9808 chip, used to check communication with the MCP9808 chip using the me405_lab4.MCP9808.check method. |
◆ celsius()
| def me405_lab4.MCP9808.celsius |
( |
|
self | ) |
|
A method to get the temperature in Celcius from the MCP9808.
- Returns
- The ambient temperature in Celcius.
◆ collect()
| def me405_lab4.MCP9808.collect |
( |
|
self, |
|
|
|
sample_time, |
|
|
|
num_samples, |
|
|
|
scale = 'C' |
|
) |
| |
A method to collect a series of temperature readings over time.
- Parameters
-
| sample_time | The time between samples, in milli seconds |
| durration | The number of samples to record |
- Returns
- A floating point array of [[time_stamp, temperature]]
◆ fahrenheit()
| def me405_lab4.MCP9808.fahrenheit |
( |
|
self | ) |
|
A method to get the temperature in Fahrenheit from the MCP9808.
- Returns
- The ambient temperature in Fahrenheit.
The documentation for this class was generated from the following file: