<commit_before># Troubleshooting

### Delay

    void loop()
    {
      delay(1000);
      Blynk.run();
    }

### Flood

    void loop()
    {
      Blynk.virtualWrite(1, value);
      Blynk.run();
    }

### Serial connection<commit_msg>Update Troubleshooting.md<commit_after># Troubleshooting

### Connection

If you have connection problems, try looking into [serial debug prints](./Troubleshooting.md#Enable-debug).

### Delay

Your application might be calling a delay() function or sleeps/cycles for a long time inside of the loop(), like this:

    void loop()
    {
      ...
      delay(1000);
      other_long_operation();
      ...
      Blynk.run();
    }
    
You should be aware that this can degrade performance of Blynk, or cause connection drops.

If you need periodic actions, consider using some timer library, like shown [in this example](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino).

### Flood

Your application may cause an enormous load on our server, please try avoiding sending data too fast.

For example, in this situation Blynk.run() will quickly finish processing incoming messages, and then new value is sent to the server immediately, causing high traffic:

    void loop()
    {
      Blynk.virtualWrite(1, value);
      Blynk.run();
    }

You might be thinking about adding a delay(), but this creates [a different trouble](./Troubleshooting.md#Delay).

If you need periodic actions, consider using some timer library, like shown [in this example](https://github.com/blynkkk/blynk-library/blob/master/examples/GettingStarted/PushData/PushData.ino).

### Enable debug

To enable debug prints on the default Serial, add on the top of your sketch **(should be the first line
)**:

        #define BLYNK_DEBUG // Optional, this enables lots of prints
        #define BLYNK_PRINT Serial

And enable serial in setup():

        Serial.begin(9600);

**WARNING : enabling debug mode will slowdown your hardware processing speed up to 10 times**.
{'fraction_non_alphanumeric': 0.09659931000492854, 'fraction_numerical': 0.007885657959586003, 'mean_word_length': 3.422657952069717, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1514942', 'n_tokens_mistral': 596, 'n_tokens_neox': 564, 'n_words': 215}