Updated i2c interface to work correctly with mBed and Hexiwear
Dependents: Hexi_Click_IRThermo_Example
Fork of MLX90614 by
mlx90614.h@0:9237d31f0d03, 2011-06-08 (annotated)
- Committer:
- aquahika
- Date:
- Wed Jun 08 09:20:11 2011 +0000
- Revision:
- 0:9237d31f0d03
- Child:
- 1:4a60d3f1e91e
First release. read temperature only.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
aquahika | 0:9237d31f0d03 | 1 | #include "mbed.h" |
aquahika | 0:9237d31f0d03 | 2 | |
aquahika | 0:9237d31f0d03 | 3 | //Melexis Infrared Thermometer MLX90614 Library |
aquahika | 0:9237d31f0d03 | 4 | |
aquahika | 0:9237d31f0d03 | 5 | //***************************************************************** |
aquahika | 0:9237d31f0d03 | 6 | // Build : 2011-06-08 Hikaru Sugiura |
aquahika | 0:9237d31f0d03 | 7 | // Only read thermo data. |
aquahika | 0:9237d31f0d03 | 8 | // |
aquahika | 0:9237d31f0d03 | 9 | // This program is based on Mr.Mitesh Patel's "mlx90614". |
aquahika | 0:9237d31f0d03 | 10 | // http://mbed.org/users/mitesh2patel/programs/mlx90614/lqnetj |
aquahika | 0:9237d31f0d03 | 11 | // |
aquahika | 0:9237d31f0d03 | 12 | // This program does not check CRC. |
aquahika | 0:9237d31f0d03 | 13 | // If you want to check CRC, please do it your self :) |
aquahika | 0:9237d31f0d03 | 14 | //****************************************************************// |
aquahika | 0:9237d31f0d03 | 15 | |
aquahika | 0:9237d31f0d03 | 16 | class MLX90614{ |
aquahika | 0:9237d31f0d03 | 17 | |
aquahika | 0:9237d31f0d03 | 18 | public: |
aquahika | 0:9237d31f0d03 | 19 | MLX90614(I2C* i2c,int addr=0xB4); |
aquahika | 0:9237d31f0d03 | 20 | bool getTemp(float* temp_val); |
aquahika | 0:9237d31f0d03 | 21 | |
aquahika | 0:9237d31f0d03 | 22 | private: |
aquahika | 0:9237d31f0d03 | 23 | I2C* i2c; |
aquahika | 0:9237d31f0d03 | 24 | int i2caddress; |
aquahika | 0:9237d31f0d03 | 25 | |
aquahika | 0:9237d31f0d03 | 26 | }; |