Recent implementation of a MLX90614 IR temperature sensor library based on the example code of Jonathan Jones. Working with the current I2C mbed library.

Dependents:   D7_MLX_AND_BAT

Fork of MLX90614 by Jens Strümper

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MLX90614.h Source File

MLX90614.h

00001 #ifndef MLX90614_H
00002 #define MLX90614_H
00003 #include "mbed.h"
00004 
00005 
00006 class MLX90614 {
00007 
00008 public:
00009     MLX90614(I2C *i2c);
00010    ~MLX90614();
00011 
00012     float ambientTemp();
00013     float objectTemp();
00014 
00015 protected:
00016 
00017     float readTemp(uint8_t reg);
00018 
00019 private:
00020 
00021     I2C *i2c_;
00022     static const int default_addr = 0x00;
00023     static const int T_ambient = 0x06;
00024     static const int T_obj1 = 0x07;
00025     static const int ram_access = 0x00;
00026 
00027 };
00028 #endif