Richard Kuo
/
NTOUEE-mbed-I2C_MLX90614
I2C MLX90614 InfraRed Thermo sensor
main.cpp
- Committer:
- rkuo2000
- Date:
- 2016-10-26
- Revision:
- 1:99681219efbe
- Parent:
- 0:0f4840f6bf23
File content as of revision 1:99681219efbe:
// NuMaker-PFM-NUC472 : I2C1 reading MLX90614 (Infra Red Thermometer) #include "mbed.h" #include "mlx90614.h" I2C i2c1(PD_12, PD_10); // I2C1_SDA, I2C1_SCL MLX90614 IRthermo; int main() { int Ta, Tobj; float T_thermo, Temp; i2c1.frequency(100000); // MLX90614 SMbus run up to 100KHz while(true) { Ta = IRthermo.getTA(); Tobj = IRthermo.getTOBJ1(); printf("Ta= %d, Tobj=%d \n\r", Ta, Tobj); } }