Please @ScruffR and @craiglockwood, is it possible to use the same code for a photon? Because am experiencing a lot of problems with mine. I am trying to design a body worn temperature sensor using the MLX90614 IR sensor and a photon to transfer the data via wifi to my iPhone using the BLYNK APP. I have tried several times with different photons and it seems like whenever i flash the code to my photon, the photon stops working i.e. it connects to the WIFI but automatically turns off or remain frozen on cyan. I have become depressed in that I have destroyed three photons already with this process of flashing the code. Please below is the code am flashing, Am just a beginner in programming so please don’t laugh lol.
// This #include statement was automatically added by the Particle IDE.
#include "blynk/blynk.h"
// This #include statement was automatically added by the Particle IDE.
#include "OneWire/OneWire.h"
#include "i2cmaster/i2cmaster.h"
char auth[] = "9ca1cf2ce8d841dab213e26a8301550a";
//#include <Wire.h>
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
void setup()
{
Blynk.begin(auth);
Serial.begin(9600);
Serial.println("Adafruit MLX90614 test");
mlx.begin();
}
void loop()
{
Blynk.run();
Serial.print("Ambient = ");
Serial.print(mlx.readAmbientTempC());
Serial.print("*C\tObject = ");
Serial.print(mlx.readObjectTempC());
Serial.println("*C");
Blynk.virtualWrite(V1, mlx.readAmbientTempC());
Blynk.virtualWrite(V2, mlx.readObjectTempC());
//Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempF());
//Serial.print("*F\tObject = "); Serial.print(mlx.readObjectTempF());
//Serial.println("*F");
//Blynk.virtualWrite(V1, mlx.readAmbientTempF());
//Blynk.virtualWrite(V2, mlx.readObjectTempF());
Serial.println();
delay(500);
}
Please help me out to indicate if am doing anything wrong and your help will greatly be appreciated. Thanks