Hmmm⌠are you somehow linking your ESP as shield (I am guessing that is what you are using) to the same COM port used for programming and your serial monitor? As in using the wrong Serial/WiFi setting in your Blynk.begin() command?
EDIT - Yes, I checked your last few topics⌠probably using a Nano with ESP-01
And I bet in all your Blynk.config() vs Blynk.begin() experimenting you have mixed up the Serial port/link used between your debug and your ESP link. Interestingly I have never seen that happen like this before
This is your problem⌠Serial references the primary programming & diagnostic (serial monitor) port of your Arduino⌠you cannot use that as well as for the ESP-01 without a lot of due diligence like unplugging the Arduino from the PC everytime it tries to boots, and unplugging the ESP everytime you want to program it.
Unfortunately, I see that the correct way is NOT as demonstrated in the Help Center files for that type of connection
Instead you need to âaddâ another serial port for the ESP-01 link with SoftSerial and wire your ESP to those pins instead⌠then follow a connection setup like in this corrected example from the Example Builder for your hardware configâŚ
Connecting pin 2 (RX) on the Arduino to TX on the ESP-01.
And Pin 3 (TX) on the Arduino to RX on the ESP-01 (You probably should use a voltage divider for this, but I have often done it directly without any problems, since the signal is rarely at full HIGH/5v voltage for any discernible time, and the pins are reportedly somewhat 5v safeâŚish ).
There are so many things wrong with what youâre doing in your code, youâll almost certainly sufferer Blynk disconnections and unresponsiveness - mostly due to what youâre doing in your void loop and the delay1 function that youâve created.
However, once you sort all of that out, there are a few ways to save memoryâŚ
Your variables that donât change (things like pin numbers and parameterised values) can be replaced with static integers which require less memory. Those that do change but that have a maximum value of 255 can be replaced with byte variables, which also require less memory than integers.
You should use the âF Macroâ in your serial print statements that contain only text (you have a lot of these).
Serial.println("Generator Shutting Down!!!");
would become:
Serial.println(F("Generator Shutting Down!!!"));
This can only be used for Serial.print and Serial.println statements that contain no variables.
sketch_may29a:7:1: error: stray '\342' in program
Serial.println(F(âHello Worldâ));
^
sketch_may29a:7:1: error: stray '\200' in program
sketch_may29a:7:1: error: stray '\234' in program
sketch_may29a:7:1: error: stray '\342' in program
sketch_may29a:7:1: error: stray '\200' in program
sketch_may29a:7:1: error: stray '\235' in program
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:28:0,
from sketch\sketch_may29a.ino.cpp:1:
C:\Users\VLAD\Documents\Arduino\sketch_may29a\sketch_may29a.ino: In function 'void loop()':
sketch_may29a:7:21: error: 'Hello' was not declared in this scope
Serial.println(F(âHello Worldâ));
^
C:\Users\VLAD\Documents\Arduino\sketch_may29a\sketch_may29a.ino:7:16: note: in expansion of macro 'F'
Serial.println(F(âHello Worldâ));
^
sketch_may29a:7:27: error: expected ')' before 'World'
Serial.println(F(âHello Worldâ));
^
C:\Users\VLAD\Documents\Arduino\sketch_may29a\sketch_may29a.ino:7:16: note: in expansion of macro 'F'
Serial.println(F(âHello Worldâ));
^
exit status 1
stray '\342' in program
You also used the wrong method of formatting your vode⌠you need to manually enter in the three backticks for and aft of your posted code⌠not use any of the âquick editâ buttons.
Anyhow, are you saying you fixed your compiling error?
Yes⌠We have seen that âtypesetâ glitch before. That is one of the reasons we push the proper formatting, as the incorrect quotes can often be displayed without it⌠thus ending up with compiling errors for those that copy the code from the topics.
Glad you caught it⌠my first time running into that had me losing some hair before noticing the misleading quote