Hey there,
I am just trying to run an example code for mlx90621. But the photon is going offline continuously.
Here is my code -
===============================
#include "MLX90621.h"
MLX90621 sensor; // create an instance of the Sensor class
void setup(){
Serial.begin(19200);
Serial.println("trying to initialize sensor...");
sensor.initialise (16); // start the thermo cam with 8 frames per second
Serial.println("sensor initialized!");
Wire.begin();
}
void loop(){
sensor.measure(); //get new readings from the sensor
for(int y=0;y<4;y++){ //go through all the rows
Serial.print("[");
for(int x=0;x<16;x++){ //go through all the columns
double tempAtXY= sensor.getTemperature(y+x*4); // extract the temperature at position x/y
Serial.print(tempAtXY);
if (x<15) Serial.print(",");
}
Serial.print("]");
if (y<3)Serial.print("~");
}
Serial.print("\n");
delay(31);
};
============================
When I try to see the serial output on Putty, I can only see "trying to initialize sensor…"
After that, there is a command to initialize the sensor and serial print.
But I never got to see the output of this second serial print command. "Serial.println(“sensor initialized!”);"
What can be the issue here?
Does this means that sensor.initialise command not working? But the code is getting compiled successfully.
Hardware connections -
SCL -> D1
SDA -> D0
VDD -> 3V3 with resistor connected, sensor getting 2.6V input voltage as requured.
VSS -> GND
Please let me know if you see any catch.
Thanks in advance,
Pratik
P.S. - My internet connection is ok. I have successfully used same photon for another application.
Color code -
White
Blinking green
Fast Blinking Blue
Fast blinking Red
Slow blinking Red (4 times)
Fast blinking Red
Slow blinking Red (4 times)
The photon goes offline after this. And the cycle continues.