upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
Public Member Functions | Static Public Attributes

API for the MAX31723 Temperature Sensor. More...

Detailed Description

Maxim Integrated* MAX31723 is a low-voltage 3-wire/SPI temperature sensor controller. This module was tested on the Maxim Integrated MAX31732PMB1 PMOD module from the analog PMOD kit.

upm::MAX31723 sensor(0, 7);
while (!doWork) {
std::cout << "Temperature " << sensor.getTemperature() << std::endl;

Public Member Functions

 MAX31723 (int bus, int csn)
short getTemperature ()
std::string name ()

Static Public Attributes

static const uint8_t R_STS_READ_CMD = 0x00
static const uint8_t R_STS_WRITE_CMD = 0x80
static const uint8_t R_TEMPERATURE_LSB = 0x01
static const uint8_t R_TEMPERATURE_MSB = 0x02
static const uint8_t B_CONT_READING = 0x00

Constructor & Destructor Documentation

MAX31723 ( int  bus,
int  csn 

Instantiates an MAX31723 object

busNumber of the SPI bus used
csnChip select (slave select) pin to use

Member Function Documentation

short getTemperature ( void  )

MAXDS3231M object destructor; basically, it closes the I2C connection. it is not needed anymore, as the connections will be closed when m_spi and m_csnPinCtx variables will go out of scope ~MAX31723 (); Gets the on-board temperature.

std::string name ( )

Returns the name of the component

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