Created
September 23, 2019 14:33
-
-
Save myarduinosale/f21e9889f72ce173171380dcca2f2c42 to your computer and use it in GitHub Desktop.
Arduino_GY-906.ino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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