How to make android app for controlling multiple servo Motor using MIT app inventor

  Рет қаралды 79,546

Magesh Jayakumar

Magesh Jayakumar

Күн бұрын

checkout the working video here: • Multi-Servo Motor cont...
This video shows step by step instruction to make android app using mit app inventor for controlling multiple servo motors. Its easier to control a single servo motor from android app, if you want to control multiple motor there come the problem, this video will explain how easily one can make an app and control several servo motors, I used arduino with multiple servo motor control app, you can use any microcontroller you want.
For arduino program and other information check the link below:
mitappsinventor...

Пікірлер: 58
@BlueCoreTech
@BlueCoreTech 8 жыл бұрын
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); // } } }
@GutteDgrowls
@GutteDgrowls 6 жыл бұрын
Does it works with the same kind of app? or you need to change something in the app?
@danielvelasquez1491
@danielvelasquez1491 8 жыл бұрын
excelente amigo, gracias!!! esto lo he estado buscando desde hace mucho, le corregí algunas cosas y me funciona perfecto (Y)
@renanzeidpereztoledo7735
@renanzeidpereztoledo7735 8 жыл бұрын
disculpe pero esta super si, me puede aser el favor esque necesito el programa para esa app
@danielvelasquez1491
@danielvelasquez1491 8 жыл бұрын
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.
@marwaboukechi4585
@marwaboukechi4585 3 жыл бұрын
@@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
@marwaboukechi4585
@marwaboukechi4585 3 жыл бұрын
SIR THANK YOU FOR THIS AWSOME VIDEO§ PLEASE CAN YOU HELP ME TO ADD BUTTTONS TO CONTROL SIMULTANIOUSLY 4 SERVOS AND A 4W CAR!
@joelarellanodelacruz7286
@joelarellanodelacruz7286 Жыл бұрын
7 años después sigue funcionando xd
@JayAmielAjoc
@JayAmielAjoc 8 жыл бұрын
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?
@trainplayernate2411
@trainplayernate2411 8 жыл бұрын
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?
@jjf0615
@jjf0615 7 ай бұрын
Yes there is, you can look at other videos on Bluetooth servo controlling to find how.
@bhargavpurohit4577
@bhargavpurohit4577 7 жыл бұрын
sir can u give me aia file of apk..
@Dinu0623
@Dinu0623 Жыл бұрын
I need this code please bro😭😭
@dedesiyah5975
@dedesiyah5975 7 жыл бұрын
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
@kdeepanshu
@kdeepanshu Жыл бұрын
Bhai is video ko hindi main bana lo
@Isotope1213
@Isotope1213 8 жыл бұрын
whats the 256? I am just tying to understand the math here
@romeohayven22998
@romeohayven22998 Жыл бұрын
Error:515 Not connected to Bluetooth module . Why is that happening ???
@handelmande5795
@handelmande5795 Жыл бұрын
Thank you very much, it was very useful and helped me a lot. Well explained and detailed
@JayAmielAjoc
@JayAmielAjoc 8 жыл бұрын
sir can you make a tutorial on an apk that can control two servos for pan/tilt with a dpad interface?
@codtougee3088
@codtougee3088 5 жыл бұрын
Hello. Sir what if. Multiple servo using click button not a slider? Please help
@MrNwathan
@MrNwathan 5 жыл бұрын
The code doesn't work you must do the -1000 away and then it will work!
@panzerfahrer6933
@panzerfahrer6933 Жыл бұрын
When I want to use the app, I get Error 516 unable to write: broken pipe. I don't really know what to do.
@v-king8024
@v-king8024 Жыл бұрын
its lack of power
@gurkanturk3012
@gurkanturk3012 9 жыл бұрын
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 :/
@dedesiyah5975
@dedesiyah5975 7 жыл бұрын
hocam anladın mı o kısmı
@gokulkrishna5335
@gokulkrishna5335 6 жыл бұрын
same doubt for me?????
@rotimiawomodu1156
@rotimiawomodu1156 2 жыл бұрын
thanks for that. Is there any other way of representing the motors as one except using only slides
@kennydedavion
@kennydedavion 4 жыл бұрын
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
@fer9621
@fer9621 6 жыл бұрын
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?
@davidaubry5718
@davidaubry5718 2 жыл бұрын
where i find the arduino code plz
@GauravKumar-oi4xp
@GauravKumar-oi4xp Жыл бұрын
Will u please share the code sir
@LovKushBrothers
@LovKushBrothers 6 жыл бұрын
ITS very helpful thanks for your education keep it up !
@alt-ht2wq
@alt-ht2wq 8 жыл бұрын
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...
@EricSchreiber
@EricSchreiber 7 жыл бұрын
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)
@vincentjonathan8381
@vincentjonathan8381 3 жыл бұрын
error could not decode as an integer
@yashikasinghal1345
@yashikasinghal1345 5 жыл бұрын
Anyone plzz tell where is code
@fear37281
@fear37281 4 жыл бұрын
good crack video helped me a lot
@TryingTogether
@TryingTogether 8 жыл бұрын
After a while the app stuck.Why this happens?Can you please explain?
@richardypil7700
@richardypil7700 7 жыл бұрын
Same here.
@vantakulasairam5401
@vantakulasairam5401 5 жыл бұрын
same here
@philipp3411
@philipp3411 9 жыл бұрын
nice vid dude...would you mind to make an external one about the arduino setup for bluetooth? would be awesome!:) left a like;)
@alexandranixu5272
@alexandranixu5272 6 жыл бұрын
When you added the bluetooth, you also added a clock. Can you please explain what is that for? ty
@nitingamare9693
@nitingamare9693 5 жыл бұрын
can anyone tell me ,,after devloping app how to download apk ,,in mit app inventor
@vantakulasairam5401
@vantakulasairam5401 5 жыл бұрын
go to build option and download it
@DennisDay58
@DennisDay58 5 жыл бұрын
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)
@diegomedina6446
@diegomedina6446 4 жыл бұрын
1234
@activedrive8310
@activedrive8310 4 жыл бұрын
Thank you!
@hasanyalcinarikanoglu
@hasanyalcinarikanoglu 8 жыл бұрын
nice job dude
@AvinashBhashkar
@AvinashBhashkar 7 жыл бұрын
nice great tutorials
@travisl6654
@travisl6654 8 жыл бұрын
why does my other servos jerk around when i try to move one of them? =(
@TryingTogether
@TryingTogether 8 жыл бұрын
+Travis D It is problem code.Remove the softwareserial from the code.I had this problem also.
@travisl6654
@travisl6654 8 жыл бұрын
Δημήτρης Βλαχοσπύρος lol yea I figured it out few days later. It was frustrating haha thanks!
@BlueCoreTech
@BlueCoreTech 8 жыл бұрын
+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); // } } }
@TryingTogether
@TryingTogether 8 жыл бұрын
Thank you very much for your code
@BlueCoreTech
@BlueCoreTech 8 жыл бұрын
+Δημήτρης Βλαχοσπύρος No problem
Как мы играем в игры 😂
00:20
МЯТНАЯ ФАНТА
Рет қаралды 3,2 МЛН
How do Cats Eat Watermelon? 🍉
00:21
One More
Рет қаралды 10 МЛН
MIT App Inventor 2 Step Slider Tutorial
7:10
NathanTR
Рет қаралды 29 М.
Tevo Tarantula 3D printing a Moon Lamp, 30 Hours print
3:23
Magesh Jayakumar
Рет қаралды 874
Mit app inventor Arduino Uno Servo motor via mobile Bluetooth tutorial
24:49
3. Servo Motor Control Arduino and Android
10:03
Magesh Jayakumar
Рет қаралды 16 М.
How to make an android app to control a robot using MIT app inventor
15:13
MIT app inventor Control Multiple Arduino's PWM pins
12:49
Zaki Zakaria
Рет қаралды 33 М.
How ChatGPT Built My App in Minutes 🤯
8:28
Website Learners
Рет қаралды 2,5 МЛН
Control an LED from a Mobile App using Access Point Mode (AP).
5:45