Skip to content

Instantly share code, notes, and snippets.

@myarduinosale
Created September 23, 2019 14:33
Show Gist options
  • Save myarduinosale/f21e9889f72ce173171380dcca2f2c42 to your computer and use it in GitHub Desktop.
Save myarduinosale/f21e9889f72ce173171380dcca2f2c42 to your computer and use it in GitHub Desktop.
Arduino_GY-906.ino
#include <Wire.h>
#include <Adafruit_MLX90614.h>
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
void setup() {
Serial.begin(9600);
Serial.println("Adafruit MLX90614 test");
mlx.begin();
}
void loop() {
Serial.print("Ambient = ");
Serial.print(mlx.readAmbientTempC());
Serial.print("*C\tObject = ");
Serial.print(mlx.readObjectTempC()); Serial.println("*C");
Serial.print("Ambient = ");
Serial.print(mlx.readAmbientTempF());
Serial.print("*F\tObject = ");
Serial.print(mlx.readObjectTempF()); Serial.println("*F");
Serial.println();
delay(500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment