Hi all,
bellow is my easy test sketch on ESP8266 Stand. My experience is:
When I am moving by slider, often ESP drop connection to cloud Blynk server and try again to reconnect. ESP does not restart luckily .
Any idea guys? thx
Roman
iOS App
Blynk lib v.0.2.5beta
ESP8266-12 Firmware v0.9.5 AT
Arduino IDE with Generic ESP8266 board
> #define BLYNK_PRINT Serial
> #include <ESP8266WiFi.h>
> #include <BlynkSimpleEsp8266.h>
> // You should get Auth Token in the Blynk App.
> // Go to the Project Settings (nut icon).
> char auth[] = "fc1b6e3d4ad14616ac149221f008axxx";
> int sliderValue = 1024;
> int randomValue;
> void setup()
> {
> Serial.begin(9600);
> Blynk.begin(auth, "wireless2", "xxx");
> }
> //Slider change values from 0 to 1023 feom Widget Slider
> BLYNK_WRITE(1)
> {
> BLYNK_LOG("Got a value: %s", param.asStr());
> sliderValue = param.asInt();
> Blynk.virtualWrite(3, sliderValue); //show slider value on vDisplay with Push setting
> }
> //Widget Graph on V2 show random values each 1s
> BLYNK_READ(2)
> {
> //int randomValue = random(1024);
> Blynk.virtualWrite(2, randomValue);
> }
> void loop()
> {
> Blynk.run();
> randomValue = random(sliderValue);
> }
Hmm, OK so I changed HW setup and used ESP as Shield with Arduino NANO with SerialPort lib. Everything is going fine (same sketch) but when quickly move with slider I got Buffer overflow immediately on Serial Monitor and then msg Ready (ping:30ms) followed.
Checked also Vcc on ESP via osciloscope - no differencies when use slider and got reconnect.
When no touch slider, reconnect to cloud never go.
i experienced this once also. it was also with an ESP (01) although i dont think it might be the reason. Could it be to many writes to the device? i had quite a high numbers on the slider. 1-10000 i think.
I experienced the issue when i moved the slider for longer periods than 1 sec. Also i fixed it by only reading the slider when i released it.
But now i cant test it again since the ESP is permanently used in another setup.
thx you joined @iclimb, I read meny yours valuable discussions.
I have values 1 - 1023 but I do not think that will be trouble because I read somewhere that values are transporting as string. I will try your hint with slider (when released). thx
Now I can not to try because I am faiting with FW AT 0.22, I can not to connect to cloud with same sketch. With FW AT 0.19 was no problem. Ufff⌠Any help more than welcome
What i ment with the high value range, was that the slider writes values to the device everytime you move the slider, and the value changes. That is, when you move the slider it moves past more values meaning more writes to the device. I donât know for sure but just som guessing.
The way i did it with reading the slider on release, was a little workaround. Cant remember the code, but i used some delay with millis(), since there is no released state of the slider as with the buttons, as far as i know.
@vshymanskyy maybe this could be an idea for the slider. An option to choose to only write the value when the slider is released. If you are just writing a value to be stored in a variable for later use, it would be unnecessary to write every value the slider is passing through?.
Yes you are right. For me is valuable to have last valuwhen I release the slider. As I can saw at Serial Monitor there is writen about 10 to 12 rows/values during slider moving. Something somewhere is overflowing⌠is my idea
thx for hints
@vhymanskyy unfortunately I am not able to take data, I changed ESP FW from v0.9.5 to recommended v0.22 and can not connect to Blynk cloud. Error msg
âŚ
[19] Blynk v0.2.5-beta
[20] Connecting to wireless2
[46] Failed to set STA mode
In ESP8266.h is info that is fully
Could you help me with ESP Shield, Volodymyr?
Lib: [WeeESP8266][1]
[1]: http://vshymanskyy/ITEADLIB_Arduino_WeeESP8266 At GitHub/Release is this info: Release 1.0.0: full support for ESP8266 0.18 AT Command Set.
But inside ESP8266.h lib is possibility to use 0.22 also. At your Example ESP8266_Shield.ino is recommendation v0.22 or later. I tried also v0.30 but NO SUCCESS. I am confused
I am back online with the original FW 0.9.5 which is working (v0.22 and v0.30 NOT) but connection to cloud is unstable.
So what is absolutely NEW is that iOS Blynk App definitely goes down max. within 2 minutes!!! and connection from ESP or Nano is reconnected. Relation between crash of iOS App, Buffer overflow and reconnection is confirmed!
iOS App NEVER gone down when I used ESP8266 Standalone and did not use Slider Widget.
Itâs very hard to tell whatâs going wrong. We have some feedbacks of such configuration running normally.
I must tell that Arduino may be just not as fast as needed to process data, and we donât have any control of bursts from the ESP8266 side, so better to stick to the ESP8266 as a Standalone. This should be rather stable, in example I was controlling quadcopter using 2 joysticks which is equivalent of moving 4 sliders simultaneouslyâŚ
OK go back to Standalone but there is also couple of surprises.
Blynk project is nice idea but a lot of work front of you. My opinion and suggestion for you focus on stability, predictability, quality and tutorials instead of quantity HW and SW platforms.
You wrote that Blyk is so easy - hmm may be when is working and at Examples. But whole system is more complex (HW wiring, firmwares, interfaces,et.) I know that many troubles are not inside Blynk but if does not work one piece of chain, whole chain is useless including your idea too and people go another way⌠Your success is relying on the othersâŚ
please think about guys your backer and patron
Roman
Blynk focuses on making it as simple as possible (but weâre not magicians, and also limited in resources), and personally I think that we are far beyond any existing project (if not, please give me some links).
We made library and server implementation open source, and we already see community helping to develop it.
The more community we attract, the more stable the project becomes. So we need to expand and include new HW support and implement new features!
We are currently working on a documentation, but we are just limited in resources to do everything we want.
I hope for your understanding.
Regarding your problem. Blynk tries to keep long connections.
No available ESP8266 (shield mode) libraries support this, at all!
So sure there may be some problems, but we got several (!!!) reports that it works.
Arduino is simply not well suited to word with ESP8266. You will find this meaning all over the internet.
If you want us (or the community) to help with your situation, please be specific in your questions. Specify exactly hardware, connections, code samples, debug log outputs⌠especially for standalone mode. Thx.
Well, Iâve got the exact same problem. The slider and the esp8266 Wi-Fi module. It works perfect with a LED and with a servo bit when i move the slider I get the buffer overflow just like rokyâs serial monitor. Please help.
Sorry for delay I was on vacation. So there is no progress unfortunately.
You can see last sentence at replay from @vshymanskyy , P.S. Development needs some patience.
Solution is welcome.
My opinion is that maybe there is no problem with Blynk directly but it does not work with Blynk.
Same problem for me as reported at [SOLVED] Slider seems to crash arduino
Nano and Serial connection, slider 10 to 30 units.
Anyone have code to fix this?