Robot Arm with PS3 Controller and ESP32 | Record and Play feature 🔥
Vložit
- čas přidán 16. 07. 2024
- In this video we are going to make Robot Arm and control it using PS3 controller and esp32 module.
We will control movements of the robot arm using servo motors.
We will pair the ps3 controller with esp32 module and send the commands to control the robot arm.
It also has feature to record and play the arm steps.
I have explained in details each step along with code.
👉 Please subscribe: czcams.com/users/hashinclude...
👉 Components list:
✅ Robot Arm Kit amzn.to/3RygIab
✅ Servo motor amzn.to/3zl7MPc
✅ ESP32 module amzn.to/3zf7OZa
✅ PS3 Controller amzn.to/4bdScCj
✅ 5v acdc Adapter amzn.to/4cvlj59
✅ Jumper wires amzn.to/3heE3Pa
👉 Shorts Channel :
/ ujwalnandanwar
👉 Code and diagram:
github.com/un0038998/Robot_Ar...
👉 ESP32 board URL:
dl.espressif.com/dl/package_e...
👉 SixaxisPairTool:
sixaxispairtool.software.info...
👉 Robot Arm with ESP32 - Smartphone controlled
• Robot Arm using ESP32 ...
👉 ESP32 Cam - Pan Tilt Control
• Pan Tilt Control using...
👉 Elevating Car
• Elevating WiFi Car usi...
👉 Parallel Parking Car
• Parallel Parking Remot...
👉 PS3 Controller Car
• RC Car using PS3 Contr...
👉 Camera Car
• Surveillance Car using...
👉 Wi-Fi Car
• Smartphone controlled ...
👉 Hand Gesture controlled car
• Hand Gesture Controlle...
👉 Watch more videos:
/ hashincludeelectronics
👉 Follow us on Instagram:
/ hashincludeelectronics
⏱Chapters
00:00 Intro
00:54 Components
01:35 Robot Arm Assembly
02:39 Connections
03:59 Code Explanation
06:34 PS3 Controller set up
07:29 Demo
09:12 Important Points
#esp32 #robotarm #ps3controller - Věda a technologie
Great! Thanks for the video!
You are welcome 👍🏻
Good job Brother,...
Thank you very much 👍🏻👏🏻
Very nice brother
Thank you very much 👍🏻👌🏻
Hello everything is fine? Would you like to know the generic control you are using? Do you have a specific model. I bought several generics and none can communicate esp32. I'm using ps3controller.h.
The control I bought it communicates with the cell phone without problem but not like the Esp32. I believe the data package that the control sends is not matching the library. Thank you for your attention. Thanks!
I have issues about connecting my PS3 controller to ESP32.
Genius
Thank you for checking out the video 👍🏻👏🏻
please make very simple robotic arm
by using this parts only ,
1) Arduino uno,
2) 4 potentiometer,
3) 2 button ,
4) 4axis arm
Thanks for your comments 👍🏻sure I will try to make this in coming days. It will be very simple and short video though. I can understand the potentiometer use , however what will these 2 buttons do ?
@@hashincludeelectronics
2 button use for record and play function
watch this video
czcams.com/video/0RcYpUzX4UA/video.html
and
explain everything in video
and use ardiuo uno.
thank you very much for making this video. is there a way to get this method to work with more then 4 servo motors. and if so how many servos can be added?
Yes you can add more servos. There are many buttons left in controller . But for that you will have to make changes in code . Please check the video and try to add it 👍🏻👏🏻
@@hashincludeelectronics awesome thank you very much for the info.
sir, can you make a 4 dof ps3 controlled robotic arm car and also give me a circuit diagram and the code for the 4 dof ps3 controlled robotic arm car?
This project is in my list and soon will have video . I am working on it .👍🏻
Hello, a question if when I want to put the Mac in the program it tells me that it cannot find it and it tries to install it but it does not install, what can I do in that case?
Please check the video slowly and carefully and follow exact steps 👍🏻👏🏻
Hi I have done everything as per the video and connected the PS3 controller with ESP32 but the servos not responding....is there any particular version of PS3 host we need to install in order to establish communication
Please provide proper power supply . 👍🏻👏🏻
Hello, If I add more servo motors and add it, for example, to the triangle button, will the x or y axis be added?
Yes you can add more servos in it 👍🏻👏🏻
If you add more servos, only the parts in which they appear change, do you add more pins and more buttons?
@@ErikGabriel-pk3gz you will have to make changes in code and also use the available pins for connections 👍🏻👏🏻
In this part of the code the number 4 indicates the number of servos that you are occupying or what it means
/This is to move servo to initial position slowly. First 4 steps are initial position
for (int i = 0; i < 4 &&
playRecordedSteps; i++)
{
@@ErikGabriel-pk3gz let me check and confirm 👍🏻👏🏻
Ps3 wireless controller cannot connect to esp32 ~ blinking
Does it matter what type of cable you use to connect the controller to the computer?
Yes. I observed the same . Some cables do not work while other works . Not sure if these data cables have required data wires . 👍🏻👏🏻
I'm having the same problem - "Compilation error: 'vector' in namespace 'std' does not name a template type" i've read the previous replies and the code is correct and i'm using the 38pin esp32 - any suggestions?
Please add this line at the top of code. #include
sir its installation esp32 code first or bluetooth mac adress first sir?
You should get the Bluetooth mac address first and then upload the final code. for uploading the code into esp32 you have to install esp32 board into your Arduino ide. this is common step.
Error = 'vector' in namespace 'std' does not name a template type
how to fix it sir?
I have replied on another message .
I have an 12volt 5amps adaptor...can i use it....esp32 module can withstand or not??
You need to use 5v adapter only 👍🏻👏🏻
@@hashincludeelectronics 5volt 3amps is enough! And thanks for your reply!!
@@MyHobbyProjects-mg77 yes that would work 👍🏻👏🏻
@@hashincludeelectronics okayy
Sir can I buy the arm kit somewhere else it's not. Available in amazon sir
Yes you can buy it where it’s available 👍🏻👏🏻
Where i can find the arm kit 3d printer diagram
You can buy this kit online . Please check the product link in the description 👍🏻👏🏻
Only the gripper works for me, the rest of the servos work only one way, what is the reason?
Please check if all servos work without assembling arm 👍🏻👏🏻
@@hashincludeelectronics The drive reserve only works clockwise
Wroom or Wrover? In the picture you have one and then you recommend another in the comments
It’s esp wroom 32 module . However while uploading code you need to select wroover board which works on wroom 32 module as well .
Robot Arm with PS3 Controller and ESP32 | Record and Play feature will run after power off and on
Is it a question for me ?
Estou fazendo exatamente igual do vídeo, code, esquema tudo certinho, estou usando uma fonte de 2 amperes mais só funciona um servo os outros 3 não funcionam, alguem pode me ajudar?
conseguiu resolver amigo ? estou com o mesmo problema
@@guilhermemagalhaes3252 Não consegui mais descobri o problema, só a porta 33 do esp32 é pwm as outras do código são entrada de dados e não saída por isso não funcionam.
Solo me funcionan los servis hacia un lado al otro el joystick no responde
You need to provide good power supply. It should provide more more than 3A current 👍🏻👏🏻
Hey, Qequs, ¿pudiste solucionar este problema? A mi me pasa lo mismo el brazo se mueve hacia un lado pero no hay vuelta atrás
In my esp32 module there is only 30pins....is work on that!
Please check if all pins are there in your module which are used in this project . If yes then it will work 👍🏻👏🏻please check the circuit diagram to see what all pins are used .
@@hashincludeelectronics thank you so much
How to fix std::vector servoPins = error
Use this line at the beginning of the code .
#include
Bro ps2x library not found error aa raha
You need to install ps3 library . Please check the video 👍🏻👏🏻
i cant able to connect the ps3 joystick to laptop
what i can do
Not exactly sure about that 👍🏻👏🏻
@@hashincludeelectronics i change the mac id of the joystick but the esp32 does not pair to joystick
Gripper servo alone working bro...other 3 servos are not working!??
Please check the video for any missing step 👍🏻👏🏻
Bro, I am having the same problem. Did you figure it out. If you did please share your solution. Thank you!
the same problem, did you manage to solve it?
@@TGV_59 Nope. and I not sure why? Still trying to fix it. If you got to work please share. Sorry, bro!
Range ?
It’s a standard Bluetooth range around 100ft 👏🏻👍🏻
sir can we use ps4 controller instead of ps3 controller
Yes you can give it a try . I did not try PS4 yet . However you will have to install PS4 library .
Thanks
Bonjour, avez-vous réussi ?
Total cost
Please add the cost of individual components to get the total cost . It depends upon where you buy these products and on how much quantity. 👍🏻👏🏻
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:14:6: error: 'vector' in namespace 'std' does not name a template type
std::vector servoPins =
^~~~~~
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:14:1: note: 'std::vector' is defined in header ''; did you forget to '#include '?
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:3:1:
+#include
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:14:1:
std::vector servoPins =
^~~
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:28:6: error: 'vector' in namespace 'std' does not name a template type
std::vector recordedSteps;
^~~~~~
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:28:1: note: 'std::vector' is defined in header ''; did you forget to '#include '?
std::vector recordedSteps;
^~~
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino: In function 'void writeServoValues(int, int, bool)':
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:45:21: error: 'servoPins' was not declared in this scope
servoPosition = servoPins[servoIndex].servo.read();
^~~~~~~~~
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:45:21: note: suggested alternative: 'ServoPins'
servoPosition = servoPins[servoIndex].servo.read();
^~~~~~~~~
ServoPins
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:58:3: error: 'servoPins' was not declared in this scope
servoPins[servoIndex].servo.write(servoPosition);
^~~~~~~~~
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:58:3: note: suggested alternative: 'ServoPins'
servoPins[servoIndex].servo.write(servoPosition);
^~~~~~~~~
ServoPins
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino: In function 'void recordRobotArmStep(int, int)':
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:64:7: error: 'recordedSteps' was not declared in this scope
if (recordedSteps.size() == 0) // We will first record initial position of all servos.
^~~~~~~~~~~~~
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:64:7: note: suggested alternative: 'recordedStep'
if (recordedSteps.size() == 0) // We will first record initial position of all servos.
^~~~~~~~~~~~~
recordedStep
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:66:25: error: 'servoPins' was not declared in this scope
for (int i = 0; i < servoPins.size(); i++)
^~~~~~~~~
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:66:25: note: suggested alternative: 'ServoPins'
for (int i = 0; i < servoPins.size(); i++)
^~~~~~~~~
ServoPins
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:78:3: error: 'recordedSteps' was not declared in this scope
recordedSteps.push_back(recordedStep);
^~~~~~~~~~~~~
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:78:3: note: suggested alternative: 'recordedStep'
recordedSteps.push_back(recordedStep);
^~~~~~~~~~~~~
recordedStep
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino: In function 'void playRecordedRobotArmSteps()':
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:84:7: error: 'recordedSteps' was not declared in this scope
if (recordedSteps.size() == 0)
^~~~~~~~~~~~~
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:84:7: note: suggested alternative: 'recordSteps'
if (recordedSteps.size() == 0)
^~~~~~~~~~~~~
recordSteps
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:91:34: error: 'recordedSteps' was not declared in this scope
RecordedStep &recordedStep = recordedSteps[i];
^~~~~~~~~~~~~
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:91:34: note: suggested alternative: 'recordedStep'
RecordedStep &recordedStep = recordedSteps[i];
^~~~~~~~~~~~~
recordedStep
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:92:32: error: 'servoPins' was not declared in this scope
int currentServoPosition = servoPins[recordedStep.servoIndex].servo.read();
^~~~~~~~~
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:92:32: note: suggested alternative: 'ServoPins'
int currentServoPosition = servoPins[recordedStep.servoIndex].servo.read();
^~~~~~~~~
ServoPins
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:102:23: error: 'recordedSteps' was not declared in this scope
for (int i = 4; i < recordedSteps.size() && playRecordedSteps ; i++)
^~~~~~~~~~~~~
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:102:23: note: suggested alternative: 'recordSteps'
for (int i = 4; i < recordedSteps.size() && playRecordedSteps ; i++)
^~~~~~~~~~~~~
recordSteps
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:106:5: error: 'servoPins' was not declared in this scope
servoPins[recordedStep.servoIndex].servo.write(recordedStep.value);
^~~~~~~~~
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:106:5: note: suggested alternative: 'ServoPins'
servoPins[recordedStep.servoIndex].servo.write(recordedStep.value);
^~~~~~~~~
ServoPins
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino: In function 'void notify()':
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:127:7: error: 'recordedSteps' was not declared in this scope
recordedSteps.clear();
^~~~~~~~~~~~~
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:127:7: note: suggested alternative: 'recordSteps'
recordedSteps.clear();
^~~~~~~~~~~~~
recordSteps
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino: In function 'void setUpPinModes()':
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:191:23: error: 'servoPins' was not declared in this scope
for (int i = 0; i < servoPins.size(); i++)
^~~~~~~~~
C:\Users\Ricardo\Downloads\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller-main\Robot_Arm_PS3_Controller\Robot_Arm_PS3_Controller.ino:191:23: note: suggested alternative: 'ServoPins'
for (int i = 0; i < servoPins.size(); i++)
^~~~~~~~~
ServoPins
exit status 1
Compilation error: 'vector' in namespace 'std' does not name a template type
I can't find the error
std::vector servoPins =
@@RicardoCosta-uy7sr please add below line at the beginning of the code .
#include
Error = 'vector' in namespace 'std' does not name a template type
how to fix it sir?
#include
@Didzi Is it guaranteed that you can?
@@SolehAlYunus Yes! To be able to use vectors or other types of containers, you must add the line at the begining of your code.
Error = 'vector' in namespace 'std' does not name a template type
how to fix it sir?
Make sure you copy the entire code from github link . Don’t miss any lines in the beginning .
@@hashincludeelectronics I make sure I download it on the Github link you gave me, not even one line is missing. but yeah that's the error like that
@@SolehAlYunus ok . Add this line at the beginning of code #include
@@hashincludeelectronics now the error is "vector.h No Such file or directory"
@@hashincludeelectronics where do i get the "vector.h" library file?