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

#include <TempSensor.h>

Inheritance diagram for PCT2075:
LM75B TempSensor

Public Types

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

Public Member Functions

 PCT2075 (uint8_t i2c_address=(0x90 > > 1))
 
 PCT2075 (TwoWire &wire, uint8_t i2c_address=(0x90 > > 1))
 
virtual ~PCT2075 ()
 
virtual float temp (void)
 
virtual float read (void)
 
virtual void thresholds (float v0, float v1)
 
virtual void os_mode (mode flag)
 
- Public Member Functions inherited from LM75B
 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)
 
- Public Member Functions inherited from TempSensor
 TempSensor (uint8_t i2c_address)
 
 TempSensor (TwoWire &wire, uint8_t i2c_address)
 
virtual ~TempSensor ()
 
virtual float temp (void)=0
 
virtual float read (void)
 

Detailed Description

PCT2075 class

About PCT2075: https://www.nxp.com/products/sensors/ic-digital-temperature-sensors/ic-bus-fm-plus-1-degree-c-accuracy-digital-temperature-sensor-and-thermal-watchdog:PCT2075

Definition at line 129 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

Tidle 

Tidle register

Definition at line 133 of file TempSensor.h.

Constructor & Destructor Documentation

◆ PCT2075() [1/2]

PCT2075::PCT2075 ( 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 56 of file TempSensor.cpp.

◆ PCT2075() [2/2]

PCT2075::PCT2075 ( TwoWire &  wire,
uint8_t  i2c_address = (0x90 >> 1) 
)

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

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

Definition at line 60 of file TempSensor.cpp.

◆ ~PCT2075()

PCT2075::~PCT2075 ( )
virtual

Destructor of PCT2075

Definition at line 64 of file TempSensor.cpp.

Member Function Documentation

◆ os_mode()

virtual void PCT2075::os_mode ( mode  flag)
virtual

Set OS operation mode

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

Reimplemented from LM75B.

◆ read()

virtual float PCT2075::read ( void  )
virtual

Get temperature value in degree Celsius [°C]

This method simply calls "temp()" method

Returns
temperature value in degree Celsius [°C]

Reimplemented from LM75B.

◆ temp()

virtual float PCT2075::temp ( void  )
virtual

Get temperature value in degree Celsius [°C]

Returns
temperature value in degree Celsius [°C]

Reimplemented from LM75B.

◆ thresholds()

virtual void PCT2075::thresholds ( float  v0,
float  v1 
)
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)

Parameters
v0a value in degree Celsius
v1a value in degree Celsius

Reimplemented from LM75B.


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