ADT7410 Temperature Sensor sample.

Dependencies:   mbed

About ADT7410

ADT7410 is a temperature sensor and can be controlled by using the I2C.

About sample program

This program outputs temperature data.
In order to run I2C communication with connecting GR-PEACH and the sensor, you will need to pull up.
Short jumper of GR-PEACH, leakage solder in two places of "PU" of the sensor base, or, add with the external resistor (10KΩ).

About wiring

SensorGR-PEACH
VDD3.3V
GNDGND
SCLD15
SDAD14

ADT7410.h

Committer:
1050186
Date:
2016-05-12
Revision:
0:6e109b79e249

File content as of revision 0:6e109b79e249:

#ifndef ADT7410_H_
#define ADT7410_H_

#include "mbed.h"

#define ADT7410_I2C_ADDR    0x90
#define ADT7410_TMPH_ADDR   0x00
#define ADT7410_CFG_ADDR    0x03

class ADT7410 {
public:
    ADT7410(PinName sda, PinName scl);

    void send(char data_0, char data_1);
    void recv(char data);
    float temp_value();

protected:
    I2C i2c;

    char buf[2];

};

#endif /* ADT7410_H_ */