BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Bug with Slider component in Blynk

esp8266
uno
#1

I’ve been attempting to get a basic light system working for the past 2 hours via using the Slider component in the Blynk app, this would change a variable from 0 to 8. I noticed an issue which involved the app popping up every few seconds saying it has Connected and Disconnected, this kept happening without direct cause. Brought the code down to the basics and then eventually changed the Auth token to a different project I had made previously that didn’t include a slider component, had absolutely no issues, uncommented the code that I would have been running prior to the issue and again no issues.

I eventually came to the conclusion that the Slider component in Blynk was bugged in some way, in the component settings I told it to only send the input once the user input is no longer there.

I am running Blynk version 2.27.3

I have checked to ensure that the ESP8266 module is receiving enough power being 3.3v*. This is connected to an Arduino UNO, I’m not using the 3.3v pin from the UNO but instead using 5v pin that takes the voltage down to 3.3v* along with a small capacitor to smooth out any possible spikes.

Here is my code so that it can be verified it’s not something that is messing with it;

#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
#include <SoftwareSerial.h>

char auth[] = "0976f7d23b2c4aabb19092dc03ab3cc8";
char ssid[] = "SKYCEDB2";
char pass[] = "LVDLBSBQSC";

SoftwareSerial EspSerial(2, 3); // RX, TX

#define ESP8266_BAUD 9600

ESP8266 wifi(&EspSerial);

BlynkTimer timer;

void setup() {
  EspSerial.begin(ESP8266_BAUD);
  delay(10);

  Serial.begin(9600);

  Blynk.begin(auth, wifi, ssid, pass);
}

// BLYNK_WRITE(V0) {
//   lightMode = param.asInt();
//   Serial.println("Changed Color" + String(param.asInt()));
// }

void loop() {
  Blynk.run();
  timer.run();
}
0 Likes

#2

You mean you set SEND ON RELEASE to ON?

You can also adjust the WRITE INTERVAL to keep from sending too much too fast of you do use continuous value sending (setting the above to OFF)

Still a bit iffy as the ESP can still brownout and cause the quick disconnections you speak of, since the continuous WiFi transmission can draw more current than the Arduinos regulator may want to provide.
It is always best to feed it (the ESP as sheild) from an independently regulated 3.3v source.

And change your Auth code again so that someone here doesn’t try to adjust your device for you :stuck_out_tongue:

0 Likes

#3

What are you controlling with this?

As for the serial print, you can also use param.asStr()

0 Likes

#5

You mean you set SEND ON RELEASE to ON?

You can also adjust the WRITE INTERVAL to keep from sending too much too fast of you do use
continuous value sending (setting the above to OFF)

@gunner Yes that is correct, and I will try to set an interval would you have the recommended code to do that. Also to provide a little more information, I only need the Blynk project to send the current Slider state once the slider value is changed which is why I decided to use the SEND ON RELEASE.

Still a bit iffy as the ESP can still brownout and cause the quick disconnections you speak of, since the continuous WiFi transmission can draw more current than the Arduinos regulator may want to provide.
It is always best to feed it (the ESP as shield) from an independently regulated 3.3v source.

I have attempted to run the ESP8266 of an independent power source which runs directly from the wall at 5v, then I use a TLV1117-33CDCY which is a 5v to a 3.3v* regulator, then I have a 100uf capacitor to smooth out any possible power spikes.

What are you controlling with this?

This just takes the input from the Slider component that would change the variable of lightMode from its current value to a value such as 6, an if statement would check if it met the condition to change which theme the lights were in, since I stripped back a majority of the code I just left that in to provide an idea of what it would be doing in normal circumstances.

0 Likes