Hey! I’ve recently acquired my Particle photon and was trying to set it up and flash code. It was successful the first time and I connected it with my project and seemed to work. But I needed to add an LCD with I2C and though making the changes in the code by including Liquid crystal I2C library would help. But I didn’t enter the wire begin () line and flashed it. It started breathing green. I tried to change the code and add the original one and bring it to safe mode and was successful. But after that, it just started breathing cyan then green then rapidly blinking cyan and repeat. I can’t seem to put it in safe mode or DFU mode at all. I’ve tried accessing it via CLI but on Mac, it’s not working. I don’t know what else to do.
I’ve enclosed the original code :
#include <LiquidCrystal.h>
LiquidCrystal lcd(6, 5, 0, 1, 2, 3);
float reading = 0;
float Temperature = 0;
float temp1 = 0;
float volts = 0;
float value = 0;
float volt = 0;
float lux = 0;
byte degree[8] =
{
0b00011,
0b00011,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000
};
void setup() {
Serial.begin(9600);
lcd.begin(16,2);
lcd.createChar(1, degree);
lcd.setCursor(0,0);
lcd.print("IoT Solar Param.r ");
lcd.setCursor(0,1);
lcd.print(" Monitoring ");
delay(2000);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("By Jasmine & Tanushree ");
delay(2000);
lcd.clear();
pinMode(A0, INPUT);
pinMode(A1, INPUT);
pinMode(A2, INPUT);
}
void loop() {
/*---------Temperature-------*/
reading=analogRead(A2);
Temperature=(reading*3.3*100)/4096;
delay(10);
/*---------Voltage----------*/
temp1=analogRead(A1);
volts= (temp1*3.3)/4096;
delay(10);
/*-----Light Intensity------*/
lux=analogRead(A0);
//volt=(value/1023.0)*5;
//lux=((2500/volt)-500)/3.3;
delay(10);
/*------Display Result------*/
lcd.clear();
lcd.setCursor(0,0);
lcd.print("T:");
lcd.print((int)Temperature);
lcd.write(1);
lcd.print("C");
lcd.setCursor(8,0);
lcd.print("V:");
lcd.print(volts);
lcd.setCursor(0,1);
lcd.print("Intens: ");
lcd.print((int)lux);
lcd.print(" Lux");
//Serial.println((int)Temp);
// Serial.println(volts);
// Serial.println((int)lux);
//delay(500);
Particle.publish("Voltage", String(volts));
Particle.publish("Temperature", String(Temperature));
Particle.publish("Light Intensity", String(lux));
delay(2000);
Particle.process();
}
If anyone could suggest something it’d be of great help