TempSensor_NXP_Arduino 0.5.4
Temperature sensor device operation sample code for Arduino
|
#include <TempSensor.h>
Public Types | |
enum | reg_num { Temp , Conf , Thyst , Tos } |
![]() | |
enum | mode { COMPARATOR , INTERRUPT } |
Public Member Functions | |
LM75B (uint8_t i2c_address=(0x90 > > 1)) | |
LM75B (TwoWire &wire, uint8_t i2c_address=(0x90 > > 1)) | |
virtual | ~LM75B () |
virtual float | temp (void) |
virtual void | thresholds (float v0, float v1) |
virtual void | os_mode (mode flag) |
virtual float | read (void) |
![]() | |
TempSensor (uint8_t i2c_address) | |
TempSensor (TwoWire &wire, uint8_t i2c_address) | |
virtual | ~TempSensor () |
virtual float | temp (void)=0 |
virtual float | read (void) |
LM75B class
About LM75B: https://www.nxp.com/products/sensors/ic-digital-temperature-sensors/digital-temperature-sensor-and-thermal-watchdog:LM75B?_gl=1*kd25ib*_ga*NTA5NDE1NDA0LjE2NzgzNDYyNzA.*_ga_WM5LE0KMSH*MTY4MjEyMjc1OC42Mi4wLjE2ODIxMjI3NTguMC4wLjA.
Definition at line 59 of file TempSensor.h.
enum LM75B::reg_num |
Name of the PCT2075 registers
Enumerator | |
---|---|
Temp | Temp register |
Conf | Conf register |
Thyst | Thyst register |
Tos | Tos registe |
Definition at line 63 of file TempSensor.h.
LM75B::LM75B | ( | uint8_t | i2c_address = (0x90 >> 1) | ) |
Create a PCT2075 instance connected to specified I2C pins with specified address
i2c_address | I2C-bus address (default: (0x90>>1)) |
Definition at line 24 of file TempSensor.cpp.
LM75B::LM75B | ( | TwoWire & | wire, |
uint8_t | i2c_address = (0x90 >> 1) |
||
) |
Create a PCT2075 instance connected to specified I2C pins with specified address
wire | TwoWire instance |
i2c_address | I2C-bus address (default: (0x90>>1)) |
Definition at line 28 of file TempSensor.cpp.
|
virtual |
Destructor of PCT2075
Definition at line 32 of file TempSensor.cpp.
|
virtual |
Set OS operation mode
flag | use PCT2075::COMPARATOR or PCT2075::INTERRUPT values |
Reimplemented in PCT2075, P3T1755, and P3T1085.
Definition at line 50 of file TempSensor.cpp.
|
virtual |
Get temperature value in degree Celsius [°C]
This method simply calls "temp()" method
Reimplemented from TempSensor.
|
virtual |
Get temperature value in degree Celsius [°C]
Implements TempSensor.
Reimplemented in PCT2075, P3T1755, and P3T1085.
Definition at line 36 of file TempSensor.cpp.
|
virtual |
Set Overtemperature shutdown threshold (Tos) and hysteresis (Thyst) in degree Celsius [°C]
This method takes 2 values and higher value will set as the threshold (Tos) and another will be the hysteresis (Thyst)
v0 | a value in degree Celsius |
v1 | a value in degree Celsius |
Reimplemented in PCT2075, P3T1755, and P3T1085.
Definition at line 41 of file TempSensor.cpp.