Joystick Configuration on Blynk Web dashboard

Hi;
I just want to know how to configure Web dashboard for joystick function. I had a working sketch but I cannot configure data streams on Web dashboard.
Thanks.

For example how do I configure web dashboard for this ?

/*************************************************************

  You can receive x and y coords for joystick movement within App.

  App project setup:
    Two Axis Joystick on V1 in MERGE output mode.
    MERGE mode means device will receive both x and y within 1 message
 *************************************************************/

// Template ID, Device Name and Auth Token are provided by the Blynk.Cloud
// See the Device Info tab, or Template settings
#define BLYNK_TEMPLATE_ID           "TMPLnO4kHMJT"
#define BLYNK_DEVICE_NAME           "Test"
#define BLYNK_AUTH_TOKEN            "RcrZDIL2MZ3KoyK76CIDGIAtmDiW3_Jv"


// Comment this out to disable prints and save space
#define BLYNK_PRINT Serial


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

char auth[] = BLYNK_AUTH_TOKEN;

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";

BLYNK_WRITE(V1) {
  int x = param[0].asInt();
  int y = param[1].asInt();

  // Do something with x and y
  Serial.print("X = ");
  Serial.print(x);
  Serial.print("; Y = ");
  Serial.println(y);
}

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);
}

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

Please edit your post and add triple backticks ( ``` ) before and after your whole sketch.

1 Like

There is no joystick widget in the web dashboard.

Pete.

1 Like

So how else can I do it? I need to write 2 parameters in my function.

Are you asking about the datastream configuration ?

Yes. To write two values x and y to one datastream. For example V1 in above example.

It should be a string type datastream, check this out

Thank you. I will try this and let you know. BTW
How do you convert string to x and y? The string value comes between 0 to 225…

Just read the topic and you will understand how it works.

1 Like

Thanks.

1 Like

Thank you so much for the prompt replies. It works fine. :heart:

1 Like