Тёмный
No video :(

PS3 CONTROLLER TO ARDUINO TUTORIAL - use a playstation 3 to control your arduino projects 

A-Tech
Подписаться 4,1 тыс.
Просмотров 30 тыс.
50% 1

In this video i show you how you can use a ps3 controller with an arduino to control your projects
Support me on Patreon: / a_tech

Опубликовано:

 

24 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 80   
@gingertew9249
@gingertew9249 Год назад
Hi I'm getting an OSC did not start error for my controller
@A-tech
@A-tech Год назад
did you get it working?
@fouzanjaved5441
@fouzanjaved5441 2 года назад
Sir, great tutorial about how to use a PlayStation to control your Arduino projects. Sir, can you make a video on youtube on making a video about an Xbox-controlled 6-dof robotic arm car using the Xbox 360 controller and give me the circuit diagram and the code for the Xbox-controlled 6-dof robotic arm car using the Xbox 360 controller? Sir, can you make a video on youtube on making a video about how to interface an Xbox controller to control your Arduino Uno?
@A-tech
@A-tech 2 года назад
hi, the reason I used ps3 is because I had some lying around, if I can get an old xbox controller i will do the same for that, thanks
@avocadoshark
@avocadoshark 2 месяца назад
Hi, I can’t seem to understand how to link this video with the hoverboard one. Like how do I get the connected ps3 controller to output to the DAC script and control the hoverboard?
@A-tech
@A-tech 2 месяца назад
hi, yes control the output of the DAC with the ps3 controller, it will be outputting a voltage, you can test it by plugging the DAC output into an analog pin and reading the voltage when sending different signals to confirm its working, hope this helps
@daaa2299
@daaa2299 29 дней назад
Which pins can i use as output for LED or something?
@A-tech
@A-tech 29 дней назад
I think pins 2,3,4,5 and possibly 6 are free
@gorchilo
@gorchilo Год назад
Hi, thanks for the video! What range do you get for your BT-controlled hoverboard vehicle?
@A-tech
@A-tech Год назад
hi, its around 15 - 20m so not very far
@AndyShrimpton-GaaTech
@AndyShrimpton-GaaTech 3 года назад
this looks very cool. so what i am thinking is, if i build a racing wheel for a ps3, full of buttons potentiometer, hall effect sensors and leds. if you can send code from the ps3 controller which i want be using. once the steering wheel is all mapped to your code, could the code then send driver inputs to the ps3 console thus then driving a car, without a ps3 controller? this would be a hugh project for me but a great learning curve
@A-tech
@A-tech 3 года назад
I don’t think it would work because the steering wheel is usb?
@EscapePlanSkateboarding
@EscapePlanSkateboarding 2 года назад
Hi, I prefer to use the PS3 controller as an actual video game controller on PC but the input lag sucks. I was thinking about using the shell/buttons with the micro pro + arduino software to "recreate" the controller but could I use a simpler method? I don't not need BT as it will increase input lag. Thanks for your help.
@A-tech
@A-tech Год назад
hi, i tried to make a controller but couldn't do it with any less lag than the ps3 one, apparently ps5 ones are pretty good on pc
@tuber8363
@tuber8363 4 месяца назад
Do you still need to use the dacs with the controller, like in your other video?
@A-tech
@A-tech 4 месяца назад
hi, thats right yes, you use the dacs to mimic the potentiometer, so you can use them with so many things, thanks
@JohnMacGuy
@JohnMacGuy 2 года назад
Nice video and great repurpose of PS3 controller. Any ideas of how to interrupt on a button push so I can put set a flag for Loop to read? I want this part of a larger controller code for my bot, so can't have it constantly polling (I think).
@A-tech
@A-tech 2 года назад
hi, so you only want it to read all the control functions when it detects a button press or a change? its not a bad idea to make the code run faster, i find using less functions works too, not sure if this helps?
@JohnMacGuy
@JohnMacGuy 2 года назад
@@A-tech My biggest problem is finding a Bluetooth dongle that works!!!! gone thru 3 so far. anyone know a good source?
@A-tech
@A-tech 2 года назад
@@JohnMacGuy hi, the ones i use are very cheap, looks like a small black block on the end of the usb plug with CSR V4.0 printed on it, hope this helps
@JohnMacGuy
@JohnMacGuy 2 года назад
@@A-tech Thanks for the reply...Can yo tell me where you got them?
@A-tech
@A-tech 2 года назад
@@JohnMacGuy hi ye sure I got them off ebay
@williammuff5485
@williammuff5485 2 года назад
Interested in that ps3 "move navigation" controller. Did you ever play with that?
@A-tech
@A-tech 2 года назад
hi, yes they are good but you dont get many buttons, ideal if its only for a basic robot
@gazznewphone
@gazznewphone 3 года назад
Nice thanks for posting, shame to hear the arduino freezes with hoverboard
@gazznewphone
@gazznewphone 3 года назад
I have used an arduino to control over dac for a scratch built remote tank little bigger one you have shown still wip
@jamesmiller9605
@jamesmiller9605 3 года назад
I've gotten the ps3 controller to connect to a hoverboard, and work flawlessly using and esp32 and my own code.
@tuber8363
@tuber8363 3 месяца назад
​@gazznewphone I know this is old, but do you happen to have a example code for this project?
@gazznewphone
@gazznewphone 3 месяца назад
@tuber8363 , yes still have the code for most of the projects ive had a play with, will have to refresh me on which one inparticular, is this hc12 comms with arduino to output dac output as theres 3 sets of code for that project, transmitter, receiver and hoverboard code/ firmware
@tuber8363
@tuber8363 3 месяца назад
​@@gazznewphone I'm interested in the Arduino to output dac output and hoverboard code.
@alabadanpraise3791
@alabadanpraise3791 3 года назад
It would be nice if you can share the source code of this project
@A-tech
@A-tech 3 года назад
its all in the ps3bt example, get the library and it will be there
@AHBabu-ws2wu
@AHBabu-ws2wu 2 года назад
Very nice tutorial!! Is it possible use RF module?? If possible, can u give me source code?
@A-tech
@A-tech 2 года назад
hi, thanks, unfortunately the ps3 controller only uses bluetooth, if you have to use rf, you can make an rf transmitter that can receive the bluetooth from the controller, i did something like that with the rc tank mk2
@adamsolovay51
@adamsolovay51 3 года назад
I would like to connect my PS3 controller to my MKR 1010 shield. It does not have a port for connecting a USB hub. Is it imperative to connect the controller with a cable to the board to pair the devices?
@adamsolovay51
@adamsolovay51 3 года назад
It appears that the PS3BT library cannot be compiled with a MKR 1010 board selected.
@A-tech
@A-tech 3 года назад
@@adamsolovay51 ok, i would say it does need the cable to be paired, unless you can split the wires and join them up to something
@duskong3615
@duskong3615 4 года назад
Nice work!, can you please post your hoverboard code?
@A-tech
@A-tech 4 года назад
hi, i would but there is a problem that i dont want others to have, something happens with the ps3 control and causes the arduino to freeze and the hoverboard motors keep going! so at the moment its not safe, thanks
@duskong3615
@duskong3615 4 года назад
No problem, thanks for your reply.
@xJustix100
@xJustix100 4 года назад
Nice!
@A-tech
@A-tech 4 года назад
Thanks!
@sirClogg
@sirClogg 3 года назад
I've been messing with Arduino for the 1st time today and since I happened to have a PS3 controller, the same BT dongle, and USB host shield (where I had to do some bridging) I figured I'll try follow your example. It seems to be working, except on my monitor I get some gibberish instead of "button up"... it's appearing as I press the buttons (the circle vibrates as well) but makes no sense. It's mostly question marks but other special characters too. Any idea what might be the cause of it?
@sirClogg
@sirClogg 3 года назад
solved. Dunno yet what the "baud" number under the serial monitor is, but it was set to different from what was in the example code "Serial.begin(115200)" setting it to the same number now gives me propper results
@A-tech
@A-tech 3 года назад
hi, yes i was just going to say that sounds like serial speed mismatch, good you figured it out
@christianaristigue2374
@christianaristigue2374 4 года назад
Hello, I uploaded the BT code and was able to connect my controller using usb hard cable but when I use my Bluetooth dongle my controller connects but I am not seeing any data in my serial monitor. Any ideas on what is wrong, thanks.
@A-tech
@A-tech 4 года назад
do you have the serial speed set the same as in the code?
@christianaristigue2374
@christianaristigue2374 4 года назад
I did set the baud rate in my code to 115200 as well as in the serial monitor
@A-tech
@A-tech 4 года назад
@@christianaristigue2374 ok once its connected, upload the ps3bt code
@naveeddilshad2825
@naveeddilshad2825 3 года назад
Is this possible with the PS4 controller
@A-tech
@A-tech 3 года назад
i think so but you would need the ps4bt library
@waleedprograms
@waleedprograms 2 года назад
How to connect a motor sheild to it
@A-tech
@A-tech 2 года назад
hi, im not sure if you can, the usb shield uses some of the pins for its thing, depending on what pins the motor shield uses it might be ok, im pretty sure pins 2,3,4,5 and 6 are ok to use, thanks
@madhuus1179
@madhuus1179 3 года назад
Very nice work & video, could you pls share the source code. Thanks in advance.
@A-tech
@A-tech 2 года назад
hi, have a look in the BTPS3 example, there us lots of code in there you can cut out, thanks
@WimpieObama
@WimpieObama 3 года назад
I dont seem to get it to work. Im new to this programming, so i might do something wrong. but i have tried 2 different USB bluetooth dungles and both a ps3 and ps4 controller (for the ps4 controller i did use PS4USB and PS4BT). Both controllers work when i connect them via cable, they do give an output in the serial monitor, but they wont connect via bluetooth with the dongle. Do you have any tips or ideas i could try?
@A-tech
@A-tech 3 года назад
did you comment out a line of the code like i showed in the video?
@WimpieObama
@WimpieObama 3 года назад
@@A-tech yes, I did. I'm gonna try it again today, but I'm sure I did everything from your video
@WimpieObama
@WimpieObama 3 года назад
@@A-tech also, im not sure if its thanks to the code, but when i connect my controller with the arduino and load the PS3USB on it, when i try the serial monitor it doesnt show like you have "cross" or "Square", it just writes some question marks and all kinds of symbols. I though it might be that i use a 3th part controller, but when i tried my official ps4 controler with the ps4 programming it still doesnt work any way. Could it be that i installed the worng libary, eventhough i am sure i used the one in this video?
@A-tech
@A-tech 3 года назад
@@WimpieObama ok i would say get hold of an official ps3 controller and go from there, thanks
@michaeljettershank9069
@michaeljettershank9069 Месяц назад
@@WimpieObama the serial monitor normally puts up lots of question marks when the serial speed settings are not matched ... i see this is 3 years old so i assume you found the problem?
@Bennyco86
@Bennyco86 3 года назад
Any chance you paste links to purchase the parts in the project?
@A-tech
@A-tech 3 года назад
its literally an arduino uno, uno usb shield, usb bluetooth adapter and a ps3 controller, thanks
@Bennyco86
@Bennyco86 3 года назад
@@A-tech I was struggling to find a USB shield for a long time, was able to find one since (was out of stock in many places)
@jelmer7806
@jelmer7806 3 года назад
Why i get the error: ''no matching function for call to 'PS3BT::getAnalogButton(Button)'' constantly? What do i have to do to upload correctly the code?
@A-tech
@A-tech 3 года назад
ok i think it should be something like this "getAnalogButton(CROSS)", hope that helps
@jelmer7806
@jelmer7806 3 года назад
@@A-tech Oke i understand but i don't see ''getAnalogButton(Button)'' even in the code. Only in the error. In the code it is ''getAnalogButton(L2)'' and ''getAnalogButton(R2)''
@jelmer7806
@jelmer7806 3 года назад
@@A-tech I used exactly the same code as you from USB_Host_Shield_Library_2_0-1.3.2 and in all videos i watch there is no problem with uploading but i don't understand why the error comes by me
@A-tech
@A-tech 3 года назад
@@jelmer7806 ok only thing i can think of is library maby? do the example sketches work?
@jelmer7806
@jelmer7806 3 года назад
@@A-tech How do you mean?
@thehope2181
@thehope2181 3 года назад
Can u share the source code
@A-tech
@A-tech 3 года назад
there is an example with the library
Далее
Use a PlayStation Controller to Control... ANYTHING!
8:55
O'ZBEK VA TOJIKLAR ROSSIYADA TERAKT UYUSHTIRISHDI!
08:41
“Bernabéu… pressure… 90,000” 🔥🔥🔥
01:02
3 Hours vs. 3 Years of Blender
17:44
Просмотров 4,6 млн
Using a Game Controller with Arduino and Processing
21:10
The coolest robot I've ever built!
19:40
Просмотров 4,6 млн
I built the ULTIMATE GAMING phone...
20:57
Просмотров 1,4 млн
O'ZBEK VA TOJIKLAR ROSSIYADA TERAKT UYUSHTIRISHDI!
08:41