Very informative! Is there a way to take the slider and replace it with a button to move the servo to set distances rather than using the slider function?
thanks for this video it is really helpfull!!!but i dont understand why you send 2 byte.i mean why you need 2 byte 1 is common for all servos and 1 is the real servo that you want to control then you use both to control 1 servo by adding like this (servopos1 *256) + servopos i really need help why you need to do this
can you please explain this part of the code? unsigned int servopos = bluetooth.read(); unsigned int servopos1 = bluetooth.read(); unsigned int realservo = (servopos1 *256) + servopos; Serial.println(realservo); can you please explain this part of the code?
Do you have any instructions on how to update the FTC Robot Controller in AppInventor? (The version in my AppInventor is not compatible with REV Expansion Hub)
please i need konoy as connect bluetooth couse when open app ahow a text that say "error connected" How do I connect the app to bluetooth since I do not get any devices or the list is hidden?
Hi, great tutorial. Can I ask for help writing code with module pca9685? do not understand the conversion of 1000 and it is difficult for me to send such values. Is it possible to solve it by strengthening two variables, one for servo, the other for angle? Thank you for your help
si claro, pero en si yo lo hice funcionar con un solo servo debo aclarar que use un modulo hc-05 el programa en arduino es: #include #include Servo servo; int btltx =7; //en esta parte la conexión es exactamente igual tx con tx int btlrx =8; SoftwareSerial bluetooth(btltx,btlrx); void setup() { servo.attach(3); Serial.begin(9600); bluetooth.begin(38400); } void loop() { if(bluetooth.available()>0){ int servopos = bluetooth.read(); Serial.println(servopos); servo.write(servopos); } } junto con esto le dejo el link del vídeo donde este mismo autor describe el programa en arduino y el app. si usted quiere mover los mas de tres servos en este vídeo esta muy explicito solo debe verificar a través del monitor serial cuanto es la salida junto con eso se entiende el por que del 256. espero le sea útil.
@@danielvelasquez1491 please can you help me I have problems with the code My arm robot start working than shut down alone I think the program is not well adapted
unsigned int servopos = Serial.read(); unsigned int servopos1 = Serial.read(); unsigned int realservo = (servopos1 *256) + servopos; Serial.println(realservo); I dont understand u are doing :/
Very informative! Is there a way to take the slider and replace it with a button to move the servo to set distances rather than using the slider function?
Yes there is, you can look at other videos on Bluetooth servo controlling to find how.
thanks for this video it is really helpfull!!!but i dont understand why you send 2 byte.i mean why you need 2 byte 1 is common for all servos and 1 is the real servo that you want to control then you use both to control 1 servo by adding like this (servopos1 *256) + servopos i really need help why you need to do this
thanks for that. Is there any other way of representing the motors as one except using only slides
can you please explain this part of the code?
unsigned int servopos = bluetooth.read();
unsigned int servopos1 = bluetooth.read();
unsigned int realservo = (servopos1 *256) + servopos;
Serial.println(realservo);
can you please explain this part of the code?
Thank you very much, it was very useful and helped me a lot. Well explained and detailed
Better arduino code.
/*
Author: Danny van den Brande.
With this code you can control multiple servo motors by using a android app.
You can add as many as you like untill your pins run out. You can add more Servos in the code.
*/
#include
Servo myservo1, myservo2, myservo3, myservo4, myservo5, myservo6, myservo7, myservo8, myservo9, myservo10;
byte serialA;
void setup()
{
myservo1.attach(9);
myservo2.attach(10);
myservo3.attach(11);
myservo4.attach(3);
myservo5.attach(5);
myservo6.attach(6);
// myservo7.attach(); fill in pin numbers if you use more then 6 servos i left them blank
// myservo8.attach();
// myservo9.attach();
// myservo10.attach();
Serial.begin(9600);//change your baudrate to your Bluetooth modules baudrate if needed.
}
void loop()
{
if (Serial.available() > 2) {serialA = Serial.read();Serial.println(serialA);}
{
unsigned int servopos = Serial.read();
unsigned int servopos1 = Serial.read();
unsigned int realservo = (servopos1 *256) + servopos;
Serial.println(realservo);
if (realservo >= 1000 && realservo =2000 && realservo =3000 && realservo < 3180){
int servo3 = realservo;
servo3 = map(servo3, 3000, 3180,0,180);
myservo3.write(servo3);
Serial.println("servo 3 On");
delay(10);
}
if (realservo >=4000 && realservo < 4180){
int servo4 = realservo;
servo4 = map(servo4, 4000, 4180,0,180);
myservo4.write(servo4);
Serial.println("servo 4 On");
delay(10);
}
if (realservo >=5000 && realservo < 5180){
int servo5 = realservo;
servo5 = map(servo5, 5000, 5180,0,180);
myservo5.write(servo5);
Serial.println("servo 5 On");
delay(10);
}
if (realservo >=6000 && realservo < 6180){
int servo6 = realservo;
servo6 = map(servo6, 6000, 6180,0,180);
myservo6.write(servo6);
Serial.println("servo 6 On");
delay(10);
}
// if (realservo >=7000 && realservo < 7180){ //UNCOMMENT if using more then 6 Servos.
// int servo7 = realservo;
// servo7 = map(servo7, 7000, 7180,0,180);
// myservo7.write(servo7);
// Serial.println("servo 7 On");
// delay(10);
// }
//
// if (realservo >=8000 && realservo < 8180){
// int servo8 = realservo;
// servo8 = map(servo8, 8000, 8180,0,180);
// myservo8.write(servo8);
// Serial.println("servo 8 On");
// delay(10);
// }
//
// if (realservo >=9000 && realservo < 9180){
// int servo8 = realservo;
// servo8 = map(servo9, 9000, 9180,0,180);
// myservo8.write(servo8);
// Serial.println("servo 9 On");
// delay(10);
// }
//
// if (realservo >=10000 && realservo < 10180){
// int servo10 = realservo;
// servo10 = map(servo10, 10000, 10180,0,180);
// myservo10.write(servo10);
// Serial.println("servo 10 On");
// delay(10);
// }
}
}
Does it works with the same kind of app? or you need to change something in the app?
Do you have any instructions on how to update the FTC Robot Controller in AppInventor? (The version in my AppInventor is not compatible with REV Expansion Hub)
When you added the bluetooth, you also added a clock. Can you please explain what is that for? ty
sir can you make a tutorial on an apk that can control two servos for pan/tilt with a dpad interface?
please i need konoy as connect bluetooth couse when open app ahow a text that say "error connected" How do I connect the app to bluetooth since I do not get any devices or the list is hidden?
sir can u give me aia file of apk..
Hello. Sir what if. Multiple servo using click button not a slider? Please help
Does anyone know what the bluetooth pairing request PIN is on Android for this? I am using Bluno uno mini (has booth tooth built in)
1234
whats the 256? I am just tying to understand the math here
Error:515 Not connected to Bluetooth module
.
Why is that happening ???
When I want to use the app, I get Error 516 unable to write: broken pipe. I don't really know what to do.
its lack of power
hi! i have arduino due...i can't upload the program...can you help me with a program(and a sketch if you can) please :( i have only 3 servos...
Hi, great tutorial. Can I ask for help writing code with module pca9685? do not understand the conversion of 1000 and it is difficult for me to send such values. Is it possible to solve it by strengthening two variables, one for servo, the other for angle? Thank you for your help
where i find the arduino code plz
ITS very helpful thanks for your education keep it up !
Will u please share the code sir
error could not decode as an integer
excelente amigo, gracias!!! esto lo he estado buscando desde hace mucho, le corregí algunas cosas y me funciona perfecto (Y)
disculpe pero esta super si, me puede aser el favor esque necesito el programa para esa app
si claro, pero en si yo lo hice funcionar con un solo servo debo aclarar que use un modulo hc-05 el programa en arduino es:
#include
#include
Servo servo;
int btltx =7; //en esta parte la conexión es exactamente igual tx con tx
int btlrx =8;
SoftwareSerial bluetooth(btltx,btlrx);
void setup() {
servo.attach(3);
Serial.begin(9600);
bluetooth.begin(38400);
}
void loop() {
if(bluetooth.available()>0){
int servopos = bluetooth.read();
Serial.println(servopos);
servo.write(servopos);
}
}
junto con esto le dejo el link del vídeo donde este mismo autor describe el programa en arduino y el app. si usted quiere mover los mas de tres servos en este vídeo esta muy explicito solo debe verificar a través del monitor serial cuanto es la salida junto con eso se entiende el por que del 256.
espero le sea útil.
@@danielvelasquez1491 please can you help me
I have problems with the code
My arm robot start working than shut down alone
I think the program is not well adapted
nice vid dude...would you mind to make an external one about the arduino setup for bluetooth? would be awesome!:)
left a like;)
The code doesn't work you must do the -1000 away and then it will work!
can anyone tell me ,,after devloping app how to download apk ,,in mit app inventor
go to build option and download it
I need this code please bro😭😭
After a while the app stuck.Why this happens?Can you please explain?
Same here.
same here
Anyone plzz tell where is code
why does my other servos jerk around when i try to move one of them? =(
+Travis D It is problem code.Remove the softwareserial from the code.I had this problem also.
Δημήτρης Βλαχοσπύρος lol yea I figured it out few days later. It was frustrating haha thanks!
+Travis D
Here i wrote a better code.
/*
Author: Danny van den Brande.
With this code you can control multiple servo motors by using a android app.
You can add as many as you like untill your pins run out. You can add more Servos in the code.
*/
#include
Servo myservo1, myservo2, myservo3, myservo4, myservo5, myservo6, myservo7, myservo8, myservo9, myservo10;
byte serialA;
void setup()
{
myservo1.attach(9);
myservo2.attach(10);
myservo3.attach(11);
myservo4.attach(3);
myservo5.attach(5);
myservo6.attach(6);
// myservo7.attach(); fill in pin numbers if you use more then 6 servos i left them blank
// myservo8.attach();
// myservo9.attach();
// myservo10.attach();
Serial.begin(9600);//change your baudrate to your Bluetooth modules baudrate if needed.
}
void loop()
{
if (Serial.available() > 2) {serialA = Serial.read();Serial.println(serialA);}
{
unsigned int servopos = Serial.read();
unsigned int servopos1 = Serial.read();
unsigned int realservo = (servopos1 *256) + servopos;
Serial.println(realservo);
if (realservo >= 1000 && realservo =2000 && realservo =3000 && realservo < 3180){
int servo3 = realservo;
servo3 = map(servo3, 3000, 3180,0,180);
myservo3.write(servo3);
Serial.println("servo 3 On");
delay(10);
}
if (realservo >=4000 && realservo < 4180){
int servo4 = realservo;
servo4 = map(servo4, 4000, 4180,0,180);
myservo4.write(servo4);
Serial.println("servo 4 On");
delay(10);
}
if (realservo >=5000 && realservo < 5180){
int servo5 = realservo;
servo5 = map(servo5, 5000, 5180,0,180);
myservo5.write(servo5);
Serial.println("servo 5 On");
delay(10);
}
if (realservo >=6000 && realservo < 6180){
int servo6 = realservo;
servo6 = map(servo6, 6000, 6180,0,180);
myservo6.write(servo6);
Serial.println("servo 6 On");
delay(10);
}
// if (realservo >=7000 && realservo < 7180){ //UNCOMMENT if using more then 6 Servos.
// int servo7 = realservo;
// servo7 = map(servo7, 7000, 7180,0,180);
// myservo7.write(servo7);
// Serial.println("servo 7 On");
// delay(10);
// }
//
// if (realservo >=8000 && realservo < 8180){
// int servo8 = realservo;
// servo8 = map(servo8, 8000, 8180,0,180);
// myservo8.write(servo8);
// Serial.println("servo 8 On");
// delay(10);
// }
//
// if (realservo >=9000 && realservo < 9180){
// int servo8 = realservo;
// servo8 = map(servo9, 9000, 9180,0,180);
// myservo8.write(servo8);
// Serial.println("servo 9 On");
// delay(10);
// }
//
// if (realservo >=10000 && realservo < 10180){
// int servo10 = realservo;
// servo10 = map(servo10, 10000, 10180,0,180);
// myservo10.write(servo10);
// Serial.println("servo 10 On");
// delay(10);
// }
}
}
Thank you very much for your code
+Δημήτρης Βλαχοσπύρος No problem
unsigned int servopos = Serial.read();
unsigned int servopos1 = Serial.read();
unsigned int realservo = (servopos1 *256) + servopos;
Serial.println(realservo);
I dont understand u are doing :/
hocam anladın mı o kısmı
same doubt for me?????
SIR THANK YOU FOR THIS AWSOME VIDEO§ PLEASE CAN YOU HELP ME TO ADD BUTTTONS TO CONTROL SIMULTANIOUSLY 4 SERVOS AND A 4W CAR!
nice great tutorials
nice job dude
Thank you!
7 años después sigue funcionando xd
Bhai is video ko hindi main bana lo
good crack video helped me a lot