Tried to boot it up in safe mode but it’s still giving me problems. The code that caused it to act up is below, but I tried deploying other code and no luck.
int sara = A0;
int raha = A1;
int saraLED = D0;
int rahaLED = D1;
int noKids = D2;
int bothKids = D3;
int test = D7;
int saraState = 0;
int rahaState = 0;
void setup()
{
pinMode(saraLED, OUTPUT);
pinMode(sara, INPUT);
Particle.variable( "sara", &saraState, INT );
pinMode(rahaLED, OUTPUT);
pinMode(raha, INPUT);
Particle.variable( "raha", &rahaState, INT );
}
void loop()
{
saraState = analogRead(sara);
rahaState = analogRead(raha);
if (saraState > 3000 && rahaState > 3000) {
digitalWrite(bothKids, HIGH);
}
else if (saraState > 3000 && rahaState < 3000) {
digitalWrite (saraLED, HIGH);
}
else if (saraState < 3000 && rahaState > 3000) {
digitalWrite(rahaLED, HIGH);
}
else if (saraState < 3000 && rahaState < 3000) {
digitalWrite(noKids, LOW);
}
else {}
}
Breathing green means the cloud is blocked, though I don’t see anything obvious in the code you’ve posted that would cause that.
What’s this “other code” you mentioned? Could you give Tinker a shot to see if that makes a difference?
Tinker is the Demo code that came with your Photon. You can flash it from the app, as well as from the Web IDE, where it’s listed under examples.
A blinking LED program (also in that list of examples) should work just fine. When running that, do you still get breathing green?
That code definitely shouldn’t cause breathing green. Are you sure it’s just breathing green, or are the other colors/patterns as well (a video would be great in this case)?
Could you try taking it out of the circuit, putting it in Safe Mode, and flashing that blinking LED example again?
When you flash new code, the previous code gets overwritten, so no need to clear anything. Safe Mode essentially runs the device without your user code, allowing you to connect, even though your code might be interfering otherwise.