Arduino Braccio Robotic Arm + Blynk

Hi,
Has anyone tried to create an app to control Robot Braccio by Blynk application?
I have Arduino UNO and tried to connect to Blynk by Wifi and use sliders to control each servo.
The application shows me that I have been connected by wifi but I have no idea how the Arduino program should look like to control each motor? Any ideas?

#define BLYNK_PRINT Serial
#include <SPI.h>
#include <WiFiNINA.h>
#include <BlynkSimpleWiFiNINA.h>
#include <Servo.h>
#include <Braccio.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "o8RwCXW5zkdI_ozoIc8Ll5KrenKDipPz";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "iPhone";
char pass[] = "**";

//Initial Value for each Motor
int m1 = 0;
int m2 = 45;
int m3 = 180;
int m4 = 180;
int m5 = 90;
int m6 = 0;

boolean moveBraccio = false;

Servo base;
Servo shoulder;
Servo elbow;
Servo wrist_rot;
Servo wrist_ver;
Servo gripper;

BLYNK_WRITE(V1)
{
  base.write(param.asInt());
}

void setup()
{
  //Intitialization of Braccio
  //All the servo motors will be positioned in the "safety" position:
  //Base (M1):90 degrees
  //Shoulder (M2): 45 degrees
  //Elbow (M3): 180 degrees
  //Wrist vertical (M4): 180 degrees
  //Wrist rotation (M5): 90 degrees
  //gripper (M6): 10 degrees
  Braccio.begin();

  // Debug console
  Serial.begin(9600);

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

  base.attach(V1);
}

void loop()
{
  Blynk.run();
  //(step delay, M1, M2, M3, M4, M5, M6);
  Braccio.ServoMovement(20, V1,  15, 180, 170, 0,  73);
}

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.