Mangue Baja Personalized MLX program

Dependencies:   mbed MY_MLX

main.cpp

Committer:
einsteingustavo
Date:
2019-08-01
Revision:
1:494ed2723916

File content as of revision 1:494ed2723916:

#include "mbed.h"
 #include "my_mlx.h"
 
 I2C i2c(PB_9, PB_8); //I2C_SDA, I2C_SCL 
 Adafruit_MLX90614 mlx(&i2c);
 Serial pc(PA_2, PA_3, 115200);
 
 float temp;
 int select; // 0 = object temp, 1 = ambient temp
 
 int main(){
    while(true){
      temp=mlx.readAmbientTempC();
      pc.printf("%4.2f Celcius\r\n", temp);
      wait(1);
    }
}