upm  0.1.8
Sensor/Actuator repository for libmraa (v0.4.5)
 All Data Structures Files Functions Variables Macros Pages
Public Member Functions
MAX31855 Class Reference

C++ API for MAX31855. More...

Detailed Description

The Maxim Integrated MAX31855 is a Cold-Junction Compensated Thermocouple-to-Digital Converter. This module was * tested on the Maxim Integrated MAX31855PMB1 PMOD module from the analog PMOD kit.

#include "max31855.h"
int
main(int argc, char **argv)
{
upm::MAX31855 *temp = new upm::MAX31855(0, 8);
std::cout << temp->getTemp() << std::endl;
return 0;
}
max31855.jpeg

Public Member Functions

 MAX31855 (int bus, int cs)
 [Constructor] More...
 
 ~MAX31855 ()
 [Constructor] More...
 
double getTemp ()
 [Destructor] More...
 

Constructor & Destructor Documentation

MAX31855 ( int  bus,
int  cs 
)

Instanciates a MAX31855 object

Parameters
busThe spi bus to use
csThe chip select pin
~MAX31855 ( )

MAX31855 object destructor

[Destructor]

Member Function Documentation

double getTemp ( )

Get the distance from the sensor

Returns
value in degrees celcius

[spi]

[spi]

[conversion]

[conversion]


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