Having issues flashing photon

My Photon doesn’t want to be flashed. It shows up as offline and no device can upload to it successfully.
I plug it into my computer, all goes normal, it has all the flashing lights and then at the end I just get either a solid Cyan light or no light at all. I can reset it or unplug it and it’ll just redo the same process. Holding the setup button for any amount of time won’t do anything, I don’t get the flashing blue light. Prior to this, I was trying to upload some code to interact with another board through i2c. I connected the SDA and SCL pins together and tied them high with a 10k resistor. I managed to upload a few variations of the code several times before it eventually just stopped working. This problem has occurred to me before, but it only lasted one reboot cycle and never persisted like it does now. Below is the code I uploaded last.

Any help would be appreciated.


// Slave Reader running on Device No.2 (Use with corresponding Master Writer running on Device No.1)

// function that executes whenever data is received from master
// this function is registered as an event, see setup()
void receiveEvent(int howMany)
  while(1 < Wire.available())   // loop through all but the last
    char c = Wire.read();       // receive byte as a character
    Serial.print(c);            // print the character
  int x = Wire.read();          // receive byte as an integer
  Serial.println(x);            // print the integer

void setup()
  Wire.begin(0xC0);                // join i2c bus with address #4
  Wire.onReceive(receiveEvent); // register event
  Serial.begin(9600);           // start serial for output

void loop()

Please try Safe Mode, that will get your photon back online so you can flash new code.

1 Like

Thank you. Seems to have solved the issue.