Interface problems

NodeMCU WiFI, Andriod 12, blynk.cloud:80, blynk version 1.0.1

BlynkTimer timer;

// This function is called every time the Virtual Pin 0 state changes
BLYNK_WRITE(V0)
{
  // Set incoming value from pin V0 to a variable
  int value = param.asInt();

  // Update state
  Blynk.virtualWrite(V1, value);
}

// This function is called every time the device is connected to the Blynk.Cloud
BLYNK_CONNECTED()
{
  // Change Web Link Button message to "Congratulations!"
  Blynk.setProperty(V3, "offImageUrl", "https://static-image.nyc3.cdn.digitaloceanspaces.com/general/fte/congratulations.png");
  Blynk.setProperty(V3, "onImageUrl",  "https://static-image.nyc3.cdn.digitaloceanspaces.com/general/fte/congratulations_pressed.png");
  Blynk.setProperty(V3, "url", "https://docs.blynk.io/en/getting-started/what-do-i-need-to-blynk/how-quickstart-device-was-made");
}

// This function sends Arduino's uptime every second to Virtual Pin 2.
void myTimerEvent()
{
  // You can send any value at any time.
  // Please don't send more that 10 values per second.
  Blynk.virtualWrite(V2, millis() / 1000);
}

void setup()
{
  // Debug console
  Serial.begin(115200);

  Blynk.begin(auth, ssid, pass);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk.cloud", 80);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080);

  // Setup a function to be called every second
  timer.setInterval(1000L, myTimerEvent);
}

void loop()
{
  Blynk.run();
  timer.run();
  // You can inject your own code or combine it with other sketches.
  // Check other examples on how to communicate with Blynk. Remember
  // to avoid delay() function!
}


Hello. This is the code from the blink email.

  1. Why is there a call to Blynk.Virtualwrite(V1, value) in the BLINK_WRITE(V0) handler?
  2. There is one button in the Dashboard on the web, just like in the android application. But if you add new elements, they do not appear in the web dashboard. Why?
  3. If you add several buttons, they are all tied to the same virtual pin, which cannot be changed anywhere. Why can’t I change my virtual PIN? On one virtual port, the buttons conflict with each other.
  4. Sometimes the board does not respond to button presses in the application. Although it works stably on the web.
  5. The description for the zergba module does not match the current settings. There are no split and merge modes. What is the difference between switch control and switch value modes? Nothing is described in the help. Min/max values are always 0/1.

Hey there,

Blynk.VirtualWrite(V1,value) will write the value to a widget or datastream attached to virtual pin 1.

Can you explain please ?

That’s not right, in blynk IOT you have to create a datastream and assign virtual pin to it first, then you will be able to choose a different virtual pin for each widget.

You can change it in the datastream configuration.

This echoes the value from the button/switch widget to the Button Value/Switch Value widget. It’s a way of showing you what’s happening in the background.

There should be three widgets on each, a button/switch and two label widgets called Uptime and Button Value/Switch Value.

They are independent of each other, as they serve different purposes. Also, there are only a few web widgets available and they work differently to the app widgets.

You should be able to select a different datastream, assuming that your template has other datastreams set-up for you to choose.
Do you have Developer Mode turned on ?

Impossible to say without more info.

That’s how the Legacy ZeRGBa widget worked, the documentation hasn’t been updated. However, how to use the IoT version of the widget is discussed if you search the forum for recent posts

There is in the iOS app.

Which widget are you referring to?

Also, have you read the documentation for the Quickstart Example, you might find that it answers some of your questions about the example…

Pete.

In mobile app I have button and zergba. In web dashboard button and two labels.

I can’t create datastream in mobile app. It says here

How to set up Datastreams for use in Blynk mobile app

that 10 Datastreams are created by default. No datastreams.

Developer Mode is turned on.

To create a datastream go to the console ( blynk.cloud ) then templates you should see datastream just click on it then go to edit mode and create your datastream.

Can’t create a datastream in the mobile app?

Yes, that’s right. To create a datastream go to blynk.cloud

1 Like

I don’t understand that comment.
There are 4 datastreams shown in your screenshot, called “Switch Control”, “Switch Value”, “Seconds” and “Button Image”

Some widgets require a specific type of datastream, so the list that you see is filtered to only show the datastream types that work with that widget.

As @John93 says, You’re far better managing your datastreams in the template view in the web console, you’ll have a far better understanding of them if you do that.

Pete.

2 Likes

@PeteKnight , @John93, thank you very much for the clarification. The new version of blynk has a very non user friendly interface. I’ll figure it out.

1 Like

@nfhktwrbq
I recommend you to read the documentation first, Introduction - Blynk Documentation

wish you Good luck.

It’s actually more user-friendly when you get used to it. Previously, you had to remember which virtual pin you’d use for a certain piece of data, and it was very easy to pick the wrong one and have to spend time figuring-out the problem.
Now you can give the datastreams sensible names and it’s easier to ensure that you choose the correct one.

Pete.

1 Like