Commit 5a44a3ca authored by Balasuriya D.A.M.'s avatar Balasuriya D.A.M.

MLX 90614 with Buzzer and Lighting System

parent 9259f210
...@@ -16,10 +16,18 @@ void setup() { ...@@ -16,10 +16,18 @@ void setup() {
} }
void loop() { void loop() {
Serial.println();
Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempC()); Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempC());
Serial.print("*C\tObject = "); Serial.print(mlx.readObjectTempC()); Serial.println("*C"); Serial.print("*C\tObject = "); Serial.print(mlx.readObjectTempC()); Serial.println("*C");
Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempF()); Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempF());
Serial.print("*F\tObject = "); Serial.print(mlx.readObjectTempF()); Serial.println("*F"); Serial.print("*F\tObject = "); Serial.print(mlx.readObjectTempF()); Serial.println("*F");
Serial.println(); Serial.println();
if (mlx.readObjectTempC()>threshold){
digitalWrite(buzzer, HIGH);
digitalWrite(12, LOW);
} else {
digitalWrite(buzzer, LOW);
digitalWrite(12, HIGH);
}
delay(10000); delay(10000);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment