Servo, ble, slider

Hi, I would like to use arduino and to control a servo with a slider by bluetooth. Is it possible?

Yes. Welcome to the Blynk forums. Please take the time to read the Documents, Help Center and Sketch Builder - All at the Top Right of this page.

For example, as per the Sketch Builder…

https://examples.blynk.cc/?board=Arduino%20Uno&shield=HM10%20or%20HC08&example=GettingStarted%2FServo

Also search this forum for a few keywords like servo, slider, etc… and you will find a few other servo code examples.

1 Like

Thanks, your code work but now i want to control five servos. I change the code like this

#include <Servo.h> 
Servo shoulder1;
Servo shoulder2;
Servo elbow;
Servo clamp1;
Servo clamp2;
#define BLYNK_USE_DIRECT_CONNECT
#include <SoftwareSerial.h>
SoftwareSerial DebugSerial(0, 1); // RX, TX
#define BLYNK_PRINT DebugSerial
#include <BlynkSimpleSerialBLE.h>
char auth[] = "881947933d3341d68a2a74e48595eec2";
BLYNK_WRITE(V1)
{
  shoulder1.write(param.asInt());
}
BLYNK_WRITE(V2)
{
  shoulder2.write(param.asInt());
}
BLYNK_WRITE(V3)
{
  elbow.write(param.asInt());
}
BLYNK_WRITE(V4)
{
  clamp1.write(param.asInt());
  clamp1.write(180-param.asInt());
}
void setup()
{
  shoulder1.attach(8);
  shoulder2.attach(6);
  elbow.attach(10);
  clamp1.attach(4);
  clamp2.attach(12);
  // Debug console
  DebugSerial.begin(9600);

  // Blynk will work through Serial
  // Do not read or write this serial manually in your sketch
  Serial.begin(9600);
  Blynk.begin(Serial, auth);
}

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

But when i control my servos, they are all moving. Could you give me a code that makes my 5 servos work please?