Mxl 90614 sensor

I created this sample below for the Adafruit MLX90614 using Blynk and Particle integration. To use Cayenne I’m beginning to explore Node Red similar to the post here: Using Node-RED as a Local Fallback Server

#include <Adafruit_MLX90614.h>
/*
mlx.readAmbientTempC()
mlx.readObjectTempC()
mlx.readAmbientTempF()
mlx.readObjectTempF()
*/

#include <blynk.h>

char auth[] = "<Auth token from Blynk>";

Adafruit_MLX90614 mlx = Adafruit_MLX90614();

void setup() {
    Serial.begin(9600);
    delay(5000); // Allow board to settle
     Blynk.begin(auth);
     mlx.begin();
}


BLYNK_READ(V1){
     int objtemp = mlx.readObjectTempF();
     Blynk.virtualWrite(V1,objtemp);
     delay(100);
}

BLYNK_READ(V2){
     int ambtemp = mlx.readAmbientTempF();
     Blynk.virtualWrite(V2,ambtemp);
     delay(100);
}

void loop()
{
    Blynk.run();
}

Hope it helps.

1 Like