I2C_device_Arduino 1.0.5
An I²C utility class for Arduino
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
test_LM75B Class Reference

#include <test_LM75B.h>

Inheritance diagram for test_LM75B:
I2C_device

Public Types

enum  mode { COMPARATOR , INTERRUPT }
 
enum  reg_num { Temp , Conf , Thyst , Tos }
 

Public Member Functions

 test_LM75B (const uint8_t i2c_address=(0x90 > > 1))
 
 test_LM75B (TwoWire &wire, const uint8_t i2c_address=(0x90 > > 1))
 
 ~test_LM75B ()
 
float read (void)
 
void thresholds (const float v0, const float v1)
 
void os_mode (const mode flag)
 
- Public Member Functions inherited from I2C_device
 I2C_device (uint8_t i2c_address, bool repeated_start_enable=true)
 
 I2C_device (TwoWire &wire, uint8_t i2c_address, bool repeated_start_enable=true)
 
 ~I2C_device ()
 
void repeated_start_enable (bool en=true)
 
bool ping (void)
 
int tx (const uint8_t *data, uint16_t size, bool stop=true)
 
int rx (uint8_t *data, uint16_t size)
 
int reg_w (uint8_t reg_adr, const uint8_t *data, uint16_t size)
 
int reg_w (uint8_t reg_adr, uint8_t data)
 
int reg_r (uint8_t reg_adr, uint8_t *data, uint16_t size)
 
uint8_t reg_r (uint8_t reg_adr)
 
void write_r8 (uint8_t reg, uint8_t val)
 
void write_r16 (uint8_t reg, uint16_t val)
 
uint8_t read_r8 (uint8_t reg)
 
uint16_t read_r16 (uint8_t reg)
 
void bit_op8 (uint8_t reg, uint8_t mask, uint8_t value)
 
void bit_op16 (uint8_t reg, uint16_t mask, uint16_t value)
 

Additional Inherited Members

- Static Public Member Functions inherited from I2C_device
static bool ping (uint8_t addr)
 
static void scan (TwoWire &target_i2c=Wire, uint8_t stop=128)
 

Detailed Description

test_LM75B operation library for Arduino

Author
Tedd OKANO

Released under the MIT license License

test_LM75B class

test class for I2C_device

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

Definition at line 27 of file test_LM75B.h.

Member Enumeration Documentation

◆ mode

Enumerator
COMPARATOR 

Comparator mode

INTERRUPT 

Interrupt mode

Definition at line 30 of file test_LM75B.h.

◆ reg_num

Name of the PCT2075 registers

Enumerator
Temp 

Temp register

Conf 

Conf register

Thyst 

Thyst register

Tos 

Tos registe

Definition at line 36 of file test_LM75B.h.

Constructor & Destructor Documentation

◆ test_LM75B() [1/2]

test_LM75B::test_LM75B ( const 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 5 of file test_LM75B.cpp.

◆ test_LM75B() [2/2]

test_LM75B::test_LM75B ( TwoWire & wire,
const 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 9 of file test_LM75B.cpp.

◆ ~test_LM75B()

test_LM75B::~test_LM75B ( )

Destructor of PCT2075

Definition at line 13 of file test_LM75B.cpp.

Member Function Documentation

◆ os_mode()

void test_LM75B::os_mode ( const mode flag)

Set OS operation mode

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

Definition at line 31 of file test_LM75B.cpp.

◆ read()

float test_LM75B::read ( void )

Get temperature value in degree Celsius [°C]

Returns
temperature value in degree Celsius [°C]

Definition at line 17 of file test_LM75B.cpp.

◆ thresholds()

void test_LM75B::thresholds ( const float v0,
const 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 22 of file test_LM75B.cpp.


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