TempSensor_NXP_Arduino 0.2
Temperature sensor device operation sample code for Arduino
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
LM75B Class Reference

#include <TempSensor.h>

Inheritance diagram for LM75B:
TempSensor P3T1085 PCT2075

Public Types

enum  reg_num { Temp , Conf , Thyst , Tos }
 
- Public Types inherited from TempSensor
enum  mode { COMPARATOR , INTERRUPT }
 

Public Member Functions

 LM75B (uint8_t i2c_address=(0x90 > > 1))
 
 ~LM75B ()
 
float temp (void)
 
void thresholds (float v0, float v1)
 
void os_mode (mode flag)
 
- Public Member Functions inherited from TempSensor
 TempSensor (uint8_t i2c_address)
 
virtual ~TempSensor ()
 
virtual float temp (void)
 

Detailed Description

LM75B class

About LM75B: https://www.nxp.jp/products/sensors/ic-digital-temperature-sensors/digital-temperature-sensor-and-thermal-watchdog:LM75B

Definition at line 51 of file TempSensor.h.

Member Enumeration Documentation

◆ reg_num

Name of the PCT2075 registers

Enumerator
Temp 

Temp register

Conf 

Conf register

Thyst 

Thyst register

Tos 

Tos registe

Definition at line 55 of file TempSensor.h.

Constructor & Destructor Documentation

◆ LM75B()

LM75B::LM75B ( uint8_t  i2c_address = (0x90 >> 1))

Create a PCT2075 instance connected to specified I2C pins with specified address

Parameters
i2c_addressI2C-bus address (default: (0x90>>1))

Definition at line 17 of file TempSensor.cpp.

◆ ~LM75B()

LM75B::~LM75B ( )

Destructor of PCT2075

Definition at line 23 of file TempSensor.cpp.

Member Function Documentation

◆ os_mode()

void LM75B::os_mode ( mode  flag)

Set OS operation mode

Parameters
flaguse PCT2075::COMPARATOR or PCT2075::INTERRUPT values

Definition at line 41 of file TempSensor.cpp.

◆ temp()

float LM75B::temp ( void  )
virtual

Get temperature value in degree Celsius [°C]

Returns
temperature value in degree Celsius [°C]

Reimplemented from TempSensor.

Definition at line 27 of file TempSensor.cpp.

◆ thresholds()

void LM75B::thresholds ( float  v0,
float  v1 
)

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)

Parameters
v0a value in degree Celsius
v1a value in degree Celsius

Definition at line 32 of file TempSensor.cpp.


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