# Constant Fast flashing red LED fault after 24-48 hr uses

**URL:** <https://community.particle.io/t/constant-fast-flashing-red-led-fault-after-24-48-hr-uses/19892>\
**Category:** Troubleshooting\
**Created:** [February 9, 2016, 11:04am UTC](https://community.particle.io/t/constant-fast-flashing-red-led-fault-after-24-48-hr-uses/19892 "2016-02-09T11:04:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mehran](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mehran](https://community.particle.io/u/mehran)\
**Post date:** [February 9, 2016, 11:04am UTC](https://community.particle.io/t/constant-fast-flashing-red-led-fault-after-24-48-hr-uses/19892/1 "2016-02-09T11:04:03Z")

</div>

Hi, my particle photon works for maybe 24hr-48hr before it starts to flash. I have looked up the sos codes but I can not see any pattern in it.

---

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [February 9, 2016, 11:07am UTC](https://community.particle.io/t/constant-fast-flashing-red-led-fault-after-24-48-hr-uses/19892/2 "2016-02-09T11:07:33Z")

</div>

If you could share the code you’re running, that might help.

---

<div class="post-metadata">

**Author:** ![mehran](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mehran](https://community.particle.io/u/mehran)\
**Post date:** [February 9, 2016, 11:45am UTC](https://community.particle.io/t/constant-fast-flashing-red-led-fault-after-24-48-hr-uses/19892/3 "2016-02-09T11:45:34Z")

</div>

sorry, was a bit rushed to post. basically sending a serial command to my boiler every second. receiving a reply, Putting the information into an array, then using blynk to display that information. I am new to c++ and in that sort of awkward stage were I know just enough to get myself in to trouble. So be gentle lol

```
#define BLYNK_PRINT Serial
#include "blynk/BlynkSimpleParticle.h"

//#define BLYNK_PRINT Serial
//#include "blynk/blynk.h"

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "opps";

byte frame[31] = {};
int combine = 0;
int dev = 0 ; //not used 

int S1;
int S2;
int flow_temp;
int max_temp;
int dhw_temp;
int dhw_set;
int fan_setpoint;
int fan_speed;
int fan_pwn;
int ion;
    
Timer Sensor(1000, ask_boiler);
//Timer app(733, ask_iot);

void setup()
{
    Serial.begin(9600);
    Serial1.begin(9600);
    delay(10000); // Allow board to settle
    Blynk.begin(auth);
    Sensor.start();

   
    
}

void ask_boiler()
{
    Serial1.write((byte)0x53);
    Serial1.write((byte)0x3f);// ? = 0x3f
    Serial1.write((byte)0x0D);
    delay(250);
    if (Serial1.available())
    {
    for (int i = 0; i <= 31; i++)
     {
     frame[i] = Serial1.read();
     }
    }
    
    S1 = 0;
    S2 = 0;
    
}
void loop()
{
      Blynk.run();
      

//////////////////////////////////////////////////    
    combine = frame[1] << 8 | frame[0];                                         
    if (S1 != combine / 100)
    {
    S1 = combine / 100;
    Blynk.virtualWrite(V0, S1);
    }
    
////////////////////////////////////////////////////
    
    combine = frame[5] << 8 | frame[4];
    if (S2 != combine / 100)
    {
    S2 = combine / 100;
    Blynk.virtualWrite(V1, S2);
    }

////////////////////////////////////////////////////
    
    combine = frame[3] << 8 | frame[2];
    if (flow_temp != combine / 100)
    {
    flow_temp = combine / 100;
    Blynk.virtualWrite(V2, flow_temp);
    }
////////////////////////////////////////////////////
    
    combine = frame[7] << 8 | frame[6];
    if (dhw_temp != combine / 100)
    {
    dhw_temp = combine / 100;
    Blynk.virtualWrite(V3, dhw_temp);
    }
////////////////////////////////////////////////////
    
    combine = frame[15] << 8 | frame[14];
    if (max_temp != combine / 100)
    {
    max_temp = combine / 100;
    Blynk.virtualWrite(V4, max_temp);
    }
    
////////////////////////////////////////////////////

    combine = frame[17] << 8 | frame[16];
    if (fan_setpoint != combine)
    {
    fan_setpoint = combine;
    Blynk.virtualWrite(V6, fan_setpoint);
    }
    
////////////////////////////////////////////////////

    combine = frame[19] << 8 | frame[18];
    if (fan_speed != combine)
    {
    fan_speed = combine;
    Blynk.virtualWrite(V7, fan_speed);
    }
    
////////////////////////////////////////////////////

    combine = frame[21] << 8 | frame[20];
    if (fan_pwn != combine / 10)
    {
    fan_pwn = combine / 10;
    Blynk.virtualWrite(V8, fan_pwn);
    }
    
////////////////////////////////////////////////////

    combine = frame[23] << 8 | frame[22];
    if (ion != combine / 10)
    {
    ion = combine / 10;
    Blynk.virtualWrite(V9, ion);
    }

    

    
}
```

---

<div class="post-metadata">

**Author:** ![mehran](https://avatars.discourse-cdn.com/v4/letter/m/2bfe46/32.png) [@mehran](https://community.particle.io/u/mehran)\
**Post date:** [February 9, 2016, 9:53pm UTC](https://community.particle.io/t/constant-fast-flashing-red-led-fault-after-24-48-hr-uses/19892/4 "2016-02-09T21:53:56Z")

</div>

is it that bad? what does the fast red flashing even mean?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [February 10, 2016, 6:38am UTC](https://community.particle.io/t/constant-fast-flashing-red-led-fault-after-24-48-hr-uses/19892/5 "2016-02-10T06:38:27Z")

</div>

This frantic red blink is no known error code, so there is definetly something very fishy, but I can’t really see anything in **_your_** code that would cause that behaviour.  
So my next guess would be something wrong with the Blynk functions, but that’d be a big task to find.

Although slowing down your `Timer` and checking if you actually got 31 bytes back from the boiler would be worth a try.  
If you get more, you should flush the rest out and if you got less you’d need to deal with the error.

---

<div class="post-metadata">

**Author:** ![peekay123](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/peekay123/32/810_2.png) [@peekay123](https://community.particle.io/u/peekay123)\
**Post date:** [February 10, 2016, 1:20pm UTC](https://community.particle.io/t/constant-fast-flashing-red-led-fault-after-24-48-hr-uses/19892/6 "2016-02-10T13:20:39Z")

</div>

@mehran, it seems that the IDE library for Blynk (0.3.2)is not matching the version on their github (0.3.3) even though the IDE version history says otherwise. The reason I know is that `BLYNKSIMPLESPARKCORE.H` is not in the new library. I will post a message on the Blynk forum.

I am not sure why you would want to wait 10sec in setup() before calling Blynk.begin() (sooner the better).

You are using a timer to read your boiler every second and use a S1 and S2 (for example) to make sure you don’t Blynk.virtualWrite() when values have not changed. A simple approach would be to simply set a flag in the Timer which is sampled in loop. When triggered, you sample the boiler, do the virtual writes (only if new values), reset the flag and continue. That keeps the timer callback simple and requires no synchronization (S1, S2) in loop(). 😄
