Ingo Lohs
Published © GPL3+

MyRemote Temperature MLX90614 Controlled by Photon

An infrared temperature sensor is suitable to signal the temperature without a touch/contact.

EasyProtip1 hour303
MyRemote Temperature MLX90614 Controlled by Photon

Things used in this project

Hardware components

Photon
Particle Photon
×1
MLX90614
also named GY-906 or D108A08
×1
Resistor 10k ohm
Resistor 10k ohm
×2
Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Story

Read more

Code

Original Example Code from Libary

C/C++
/***************************************************
  This is a library example for the MLX90614 Temp Sensor

  Designed specifically to work with the MLX90614 sensors in the
  adafruit shop
  ----> https://www.adafruit.com/products/1748
  ----> https://www.adafruit.com/products/1749

  These sensors use I2C to communicate, 2 pins are required to
  interface
  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.
  BSD license, all text above must be included in any redistribution
 ****************************************************/

#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());
  //String ambient_tempc = String(mlx.readAmbientTempC());
  //Particle.publish("Ambient Temp Grad Celsius", ambient_tempc, PRIVATE); // publish to cloud
  
  Serial.print("*C\tObject = "); Serial.print(mlx.readObjectTempC()); Serial.println("*C");
  String object_tempc = String(mlx.readObjectTempC());
  Particle.publish("Object Temp Grad Celsius", object_tempc, PRIVATE); // publish to cloud
  
  //Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempF());
  //Serial.print("*F\tObject = "); Serial.print(mlx.readObjectTempF()); Serial.println("*F");

  Serial.println();
  
  delay(500);
}

Credits

Ingo Lohs

Ingo Lohs

30 projects • 45 followers
I am well over 40 years and come from the middle of Germany. You can contact me also in German. Donation for projects: paypal.me/ingolohs
Contact

Comments

Add projectSign up / Login