BORON LTE boots up to pulsing CYAN than RGB led stops

Wrote code for BORON that “breaths” pin D7 (Blue led by the usb connector) and does some other stuff.
See below for the loop code. It also uses the #include <TM1637Display.h> library.

Firmware upload ok, but now the BORON boots all the way to the pulsing cyan led (so everything looks good) then the cyan led turns off (the RGB no longer does anything) and only the blue led on D7 breaths. All attempts to reprogram fail with a timeout, and trying to enter safe mode fails. (mode + reset, release reset, wait for majenta, release mode). Any ideas on next steps.

void loop() {

double Vscale = 0.0008;          // Vdc per bit to convert to volts
double Iscale = 0.0008;          // Idc per bit to convert to current

// update data
  digital_in_1          = digitalRead(DIGITAL_IN_1);
  digital_in_namur      = digitalRead(DIGITAL_IN_NAMUR);
  analog_in_v           = analogRead(ANALOG_IN_V) * Vscale;
  analog_in_4_20mA      = analogRead(ANALOG_IN_4_20MA) * Iscale;

// update led
        bright = bright + 100;
        if (bright > 4000)
            state = FALSE;
            Particle.publish("Going Up");
        Serial.print("Gowing Up");Serial.println(bright,DEC);
        bright = bright - 100;
        if (bright < 10)
            state = TRUE;
            Particle.publish("Going Down");

         Serial.print("Gowing Down");Serial.println(bright,DEC);
    analogWrite(BREATH_LED, bright); 
    display.showNumberDec(1234); //Display the Variable value;

As a follow up I get the following in the console
The device is disconnecting from the Particle Cloud too frequently. Large numbers of cloud disconnects are often caused by poor signal strength or network congestion. If possible, move the device to a place with better Cellular signal.

But another BORON does the same thing. So I don’t think signal strength it is. I think there is probably a tight loop in the TM1637 library and its starving the cellular task.
Still have no idea on why this would prevent safe mode from working.

Kept trying and after about 10 tries was able to get new code flashed. Biggest change is I had the D7 tied to a breathing function above but D7 was also used in a call back function. Assigning different DI’s to each one solved the problem. Not sure why this was a problem, as I was not calling the call back function.