Hi guys , I have observed that you guys are sometimes facing issue while pairing the controller . I would suggest try changing the usb cable and issue should be fixed 👍🏻👏🏻
Thank you very much bro I immediately subscribed from a long time ago, this is a very extraordinary project actually and I am very excited to want to follow the steps, but I'm not so excited bro because the Sixaxis pairtool application does not detect my PS 4 address. Please really bro how do I handle it even though I'm already excited?
@@hashincludeelectronics bro it connects sometimes or else it gives me " rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0030,len:1288 load:0x40078000,len:13872 load:0x40080400,len:4 ho 8 tail 4 room 4 load:0x40080404,len:3048 entry 0x40080590 E (276) quad_psram: PSRAM ID read error: 0xffffffff, PSRAM chip not found or not supported Ready." and the controller doesnt connect please help me out
I noticed if the PS4 controller is connected to anything else previously like my PC then it wont connect to the esp32 even if PC's blutetooth is off. I previously had my ESP32 robot connected to the PS4 controller successfully then i wanted to play some PC games with the controller and reconnected to my PC bluetooth. After doing this i could no longer connect to the ESP32's bluetooth to control the robot. I used the code to wipe all the BT connections on the ESP32 provided in the description and it reconnected with the PS4 controller after wiping the esp32 and I was once again able to control the robot. But now i cant connect to the PC to play games so, as a fix; it seems i need to reset the controller via the tiny hole and reset button on the back of the controller and then I can successfully connect to my PC's bluetooth for gaming. This does disconnect me from the esp32 permanently until i run the BT wipe code and reconnect the controller to the esp32's bluetooth but at least there are solutions. hope this long winded comment helps out some of you out there.
Great tutorial. Please note that mods to library files are incorrect. Need to leave line 87 un-commented and comment out line 89. Your solution gives a complie error "too few arguments to function ". Also, I needed top add this at line 43 of PS4Controller.cpp : "#define ESP_BD_ADDR_STR "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx"". Now everything works. Thanks
After two days of trying with a very cheap controller from Amazon that did not connect with the sixaxispairtool, I broke down and paid $64 for an official Sony PS4 controller. That controller did connect to sixaxispair tool and I can set the MAC address. Now, like many persons, it does not connect to the ESP32. I notice in your diagram that you have a 38 pin esp32. I am going to try different ESP32 boards and see if a different one will connect. Dronebot workshop is doing similar work with PS3 controller. I might try his code also.
Excellent work, the only problem I had was linking the PS4 controller to the esp32, I solved it by leaving the library code as it is, after that it was linked correctly to the esp32
Thanks for checking out the video and nice comment . Yes that’s because of you must be using new version of esp32 board . Good that you had it resolved 👏🏻👏🏻
Hey harsh it's working but when i remove the cable which is connected to the laptop and esp32 and connet the esp32 to my car it doesn't connect with my ps4 controller
I use original ps4 controller and it has to click home button and share button in the same time to connect the bluetooth but it doesnt want to connect with the esp32
You can fix the compilation bug by replacing in ps4_spp.c the line (89) "esp_bt_gap_set_scan_mode(ESP_BT_SCAN_MODE_CONNECTABLE);" by "esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);"
After commenting those lines of code I get an error when compiling "error: 'ESP_BT_SCAN_MODE_CONNECTABLE' undeclared (first use in this function); did you mean 'ESP_BT_NON_CONNECTABLE'? esp_bt_gap_set_scan_mode(ESP_BT_SCAN_MODE_CONNECTABLE); ", can someone help me?
For the people that is getting a upload error. Please make sure the cable is able to trasmit data. It happened to me and I got it working immediaty after changing the cable
Amigo, tentei aqui com vários controles Ps4 mais nenhum tem comunicação com esp32, assisti várias vezes seus vídeos, segui todo o procedimento, porém sem sucesso,
Bruh Loved your video, but only issue is that my controller disconnects after few seconds, so i uploaded your remove paired device program to my esp because of which my esp becomes unable to connect and doesnt show ready in serial monitor. so i have to reupload your Receive Data program and same thing happens all over, hope u could help me out, Please and Thankyou
Some more information...I have a PS4 controller. It will not connect to the ESP32. When I run the code from Dronebot Workshop for connecting a PS3 controller, it DOES connect to the ESP32. But the data is totally messed up. This is starting to get above my level of understanding. But I would think some smart person out there could utilize the connection algorithms from the PS3 code to get the PS4 to connect.
Great Video, I followed the instructions and it solved the compilation error, But I still can't Pair the controller Which Version of ARDUINO IDE does this work for? (I'm using 1.8.19)
I couldn't find a safe way to download the sixaxis pair tool, so I found the MAC address of the controller and wrote that as a string into the PS4.Begin() function call in the setup function like " void setup() { Serial.begin(115200); PS4.attach(notify); PS4.attachOnConnect(onConnect); PS4.attachOnDisconnect(onDisConnect); PS4.begin("a0:ab:51:8d:9x:7c"); Serial.println("Ready."); } " The function is used that way in the example codes of the library, but I can't get them to pair. does the fix to the compilation error change the way that this function can be used? I am using the same version esp32 board (1.0.6) that you downloaded from the board manager. but I'm using a ESP32-Wroom-32, so I select "ESP32 devkit" from the board manager (or else I'd get a PSRAM ID error) @@hashincludeelectronics
hello everyone, Harsh bruh loved your video i was imitating each step you did but at the end the controller wasnt able to connect to the ESP32. After 2hrs of trial and error i found out that the comment(//) in the library had to do with it so this is what worked for me hope it could help u guys. Line 86, 87, 88, 90 commented(//) and Line 89 uncommented.
which file exactly? ive been fighting the ps4 controller disconnect for a week now, many wipes many removed bonded devices still issues uts driving me insabe controller connects for a second then turns off
@@hecticaperturemake changes in the .src file shown in video.(worked for me) Try resetting your controller(small switch on the back) Make sure ur controller is charged to full, mine kept disconnecting after after few seconds, after charging problem solved This should work
@@haripatel3012 This is incorrect. People that are NOT having the same issue should stop posting useless solutions. Solutions that I have tested extensively (over 10 times each): Changes to source file in video (this is irrelevant, this is a compile issue) Charged the controller to full Used code provided to delete paired devices Used many other codes online including example on core to remove ALL paired devices Used ESPTOOL to delete flash Held the reset button on the back of the controller for intervals between 10 seconds and 5 minutes. Downgrade ESP32 board to versions from 2.0.12 to 1.0.6 (this code is completely broken for 3.0.0+) Tried ALL this over 10 times each with 3 different controllers With over 2 weeks of constant research, it is irritating that people that literally have no clue try to give advice. Its OK not to know the answer, its OK for you to not be knowleadgable. It is not valuable to LOOK like you gave help instead of actually helping. If you dont know an actual answer please do not waste anybodys time replying with irrelevant information. thanks
why, after commenting out the file in ps4_spp, the error comes out note: declared here esp_err_t esp_bt_gap_set_scan_mode(esp_bt_connection_mode_t c_mode, esp_bt_discovery_mode_t d_mode); . And if you do not comment on this line, then everything works, but the ps4 controller does not connect
Hello, thank you very much for your video, I have a question, when I uploaded the code for minute 2:30, it gave me an error that told me that in line 89 of the ps4 controller script, there was data that I did not recognize, I commented on that line and the problem was fixed and I was able to upload the code, but when I tried to connect the controller later, it does not recognize it, is it necessary to have the code for line 89?, or am I doing something wrong
@@hashincludeelectronics Thank you for your answer, I have another question, looking at my esp32 module I realized that it is the esp32S module, does the code work the same with this version of the board?
Mr Hash: can you please post the exact model number of the ps4-controller that you are using so I can try and find one of the same model. The one I have does not connect to the 'sixaxis pair tool' so I am unable to get passed that stage. I have managed to retrieve the BT MAC for my ESP32 DevkitC v4, and I am able to use my Lenovo M10 android tablet with various BT 'scanner apps' to 'find' the ps4-controller and to 'pair' my tablet with it. Some of these apps also told me the BT MAC of the ps4_controller which could be helpful. So I have BT MAC's for both sides of the ESP32/PS4_controller pair but am unable to complete the 'sixaxis pair tool' process. The model of ps4_controller that I currently have is CUH-ZCT-2U and came from Aliexpress. No specific make shown.
I now know that the reason my 'sixaxis pair tool' process is failing is because my ps4-controller device is not installing on the USB correctly. The Device Manager shows "Unknown USB device(Device Descriptor Request Failed)". So I guess there is nothing I can do about that other than find a different device.
@@andreyl2705 that is interesting, I thought it was just me. I have noticed that when I plug the PS4_controller into my PC USB port, the PS4_controller goes into 'charge mode' and cannot turn on. I have a special USD plug that isolated the charging wire and that allows the controller to attempt to install the usb connection, but that also fails with an 'unrecognised device' message. What I do not get is why so many other do not seem to have this issue.
I tried with two different ESP32 chips. None worked. An ESP-WROOM-32, and an ESP32-CAM. Code compiled, is uploaded, bluetooth address is shown. But my official PS4 controller won't pair.
Thanks so much for this tutorial. I'm fairly new to Arduino and connectivity like this but was able to pair up my PS4 controller to an esp32 and got the LED's from the test code to work. Excited to learn more and watch your other videos. Thank you for the time and effort you've put in to making these.... There isn't much documentation on these ESP32 boards that I could find, but I was able to figure out how to upload the sketch from previous drone building days where you had to hold buttons on power up to load into bootloader. On my ESP32 board I had to plug in, hold one button while pressing the other and I saw in serial monitor that got me in bootloader and gave message ready to download. However when I uploaded the sketch the com port would time out and say bootloader not ready. So after hours of trial and error, I uploaded (compiled) the sketch and when it gave the message of connecting to com port - I did the bootloader sequence on the board and sure enough it started writing the sketch to the board. I'm not sure if this is specific to the board I got off Amazon - but it sure did take a lot of tinkering and maybe some luck to figure this out! Maybe this comment will help someone else!
Thank you very much for checking out the video and nice words . Surely this will help others if they face issue while working with esp32. Thanks for sharing experience 👏🏻👍🏻
@@hashincludeelectronics Any idea how to map the r2 button to specific servo location/angle? I want to use that button on a servo similar to using a pot with a servo - but everything I'm finding is for pots and it's not quite working out - the r2 button works to control servo, but it's either moving full rotation or nothing - it wont, for instance hold a position in half rotation if I was to press r2 half way down... even though it shows the r2 value correctly in serial monitor going from 0 to 255 as I depress it... I'm stuck, but I bet it has something to do with the r2 button not actually being an analog pot. which is what all the tutorials are showing - Any ideas / suggestions?
@@hashincludeelectronics void loop() { val = analogRead(PS4.R2Value()); // read the value of the R2 button (value between 0 and 255) Serial.printf("Non-Map Value at %d ", val); // delay(600); val = map(val, 0, ADC_Max, 0, 180); // scale it to use it with the servo (value between 0 and 180) myservo.write(val); // set the servo position according to the scaled value Serial.printf("Mapped Value at %d ", val); Serial.printf("PS4 R2 Value at %d ", PS4.R2Value()); delay(600); Delay and print outs are just for trying to figure out what's going on - This is what I'm seeing in serial monitor: The first loops are without pressing, the last loops are with the R2 pressed. - it's not showing what I'd expect. ADC_Max is set to 4095. Non-Map Value at 4095 Mapped Value at 179 PS4 R2 Value at 0 PS4 R2 at 0 Non-Map Value at 4095 Mapped Value at 179 PS4 R2 Value at 38 PS4 R2 at 1 Non-Map Value at 0 Mapped Value at 0 PS4 R2 Value at 255 PS4 R2 at 1 Non-Map Value at 0 Mapped Value at 0 PS4 R2 Value at 255 PS4 R2 at 1
@@kevbomtb6078 I got the problem . Don’t read the value using analogRead. The value is already given by PS4.R2Value(). This value itself is from 0-255. So use this value as it is in map function . val = PS4.R2Value(); val = map(val, 0, 255, 0, 180); and use this val for servo .
Hi I am using a ASPIS 3 wireless controller and when I am trying to search with the SixaxisPairTool it doesn't find any device. Do you have any idea why?
Not sure how did you code for servos . May be add some delay before changing the servo position . Also increase/decrease the servo angle in each step . 👏🏻👍🏻
i already change mac adress to make it the same,using 2 method, getting adress from saved address from controller then pasted on esp32,and getting esp32 address then write to the controller,but it doesnt work for me,i already comment some line on ps4spp files like in the video,but doesnt work,when im pressing home button led just blinking then turned off,then im trying to connect my controller to pc for testing playing some games its just fine,then im trying connecting esp32 bluetooth with my android using SerialBluetooth example and its perfectly fine, i mean both device function just normal,but still didnt work when trying to pairing my controller to the esp, need help here
I've been having issues with pairing a generic PS4 controller with my ESP32. Initially, I downloaded the SixaxisPairToolSetup-0.3.1 program to change the MAC address. However, when I enter the code, compile it, and try to pair it with the controller, it blinks about 3 times and stays on for only 2 seconds before turning off. Now, after trying the same code multiple times, the controller keeps blinking until it turns off. Any ideas on what could be causing this issue? Why isn't it working? Thank you.
Com ports are different for different users based what already being used on the computer . So this can be connected to any available port . Try selecting the ports which are shown to you in Arduino ide .
I bought 3 different ps4 controllers from amazon. they all do the exact same thing. followed all the steps in the video, tried every suggestion made by others in the comments. everything seems to work up until time to pair the controller. all 3 controllers just flash and turn off after a few min. None ever connect. I cleared previous bt paired devices, but there are none. esp32 is brand new. Never hooked anything to bt yet. all controllers new out of box, not connected to anything but the PC via usb to set master mac. Tried to make changes suggested by Tony Johnson, "Need to leave line 87 un-commented and comment out line 89. Your solution gives a complie error "too few arguments to function ". This gave me compile errors. but it worked with the edits in the video (maybe difference in version of librarys or board?) Tried "add this at line 43 of PS4Controller.cpp : "#define ESP_BD_ADDR_STR "******".(my esp32 mac address) and this didn't seem to do anything for me one way or another. Granted none of my controllers are the exact one used in this video, but all very similar. And my esp32 is just an amazon "AITRIP 2 Sets ESP-WROOM-32 ESP32 ESP-32S Type-C USB Development Board" What versions of software is everyone running? what esp32 library version? what ps4 version? what IDE version? I am going to try to order the exact controller and try again... but i think i will have the same results.
I bought a real sony PS4 controller and it worked with the original library with no modifications right off the bat. simple as anything. Cant believe i spend 2 days trying to get generic controllers to work. apparently most of the generic ps4 controller now are just generic game pads, or xbox controllers made to look like a ps4 controller.
@@kensoggs damn,at the end im using ps3 controller for my project,it works perfectly fine with original or clone,oh even with that ps4 controller code u still can use ps3 controller connected aswell
hi@@absky14r I'm sorry but how you solve the problem that you had previously? I have issue that my pc can't read PS4 and also my PS4 can't connect to ESP32... I did many things but still it doesn't work until now. Could you give me some advice?
Great video. Is this possible to do with an Xbox one controller, assuming it has Bluetooth? Will I have to have a completely different code and is that available anyware?
@@hashincludeelectronics I borrowed a PS4 controller from a friend, your code worked perfect and your video is super easy to follow. Thank you so much for this video!
First of all, thanks for the clear explanation. I encounter the same problem with the re-connection issue. I've tried in the remove pairing and can be connected again, but only once. Is there any better solution on this issue? Thanks in advance.
@@hecticaperture i faced the same and i found the solution if u still intrested or any one in the future is the solutions is : to erase esp flash using esptool in python
@@hashincludeelectronics i've tried to connect to the ps4 after uploading the receive data code. in the video you just pressed the 'home' button while on my ps4 controller, the center button is the playstation button. after i pressed the button, it isn't connected as yours. so there's no reading on the serial monitor, just the status 'ready'
Im working with 2 different wroom from 2 different sellers, they are not connecting to the controller after triple checking everything. i see there are multiple people with this issue. is this an issue with the board or the user?
Great tutorial. I have the Arduino Nano IOT 33 which I would like to connect to my PS4 controller, any chance that you already have a tutorial for that as well?
@@hashincludeelectronics There is a ready made library called "bluepad32 " made by Ricardo Quesada. in order to work with that, the Nina module on the Nano IOT board need to be flashed with the required firmware. the flashing process is not that easy for some like me who has no experience with firmware flashing...
@@haimn1193 agree . Flashing new firmware is difficult . You can check for more information on net . Hopefully you will get something in this direction 👍🏻
hello, I loved your video and I wanted to try it but when commenting on the lines it still shows me an error and I don't know what to do because I'm new to robotics
@@hashincludeelectronics when I load the code I get: /home/student/Arduino/libraries/PS4-esp32-master/src/ps4_spp.c: In function 'sppCallback': /home/student/Arduino/libraries/PS4-esp32-master/src/ps4_spp.c:89:30: error: 'ESP_BT_SCAN_MODE_CONNECTABLE' undeclared (first use in this function); did you mean 'ESP_BT_NON_CONNECTABLE'? esp_bt_gap_set_scan_mode(ESP_BT_SCAN_MODE_CONNECTABLE); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ESP_BT_NON_CONNECTABLE /home/student/Arduino/libraries/PS4-esp32-master/src/ps4_spp.c:89:30: note: each undeclared identifier is reported only once for each function it appears in /home/student/Arduino/libraries/PS4-esp32-master/src/ps4_spp.c:89:5: error: too few arguments to function 'esp_bt_gap_set_scan_mode' esp_bt_gap_set_scan_mode(ESP_BT_SCAN_MODE_CONNECTABLE); ^~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /home/student/Arduino/libraries/PS4-esp32-master/src/ps4_spp.c:4: /home/student/.arduino15/packages/esp32/hardware/esp32/2.0.5/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h:480:11: note: declaredhere esp_err_t esp_bt_gap_set_scan_mode(esp_bt_connection_mode_t c_mode, esp_bt_discovery_mode_t d_mode); ^~~~~~~~~~~~~~~~~~~~~~~~~ /home/student/Arduino/libraries/PS4-esp32-master/src/ps4_parser.c: In function 'parsePacketSensor': /home/student/Arduino/libraries/PS4-esp32-master/src/ps4_parser.c:278:10: error: 'ps4Sensor' is used uninitialized in this function [-Werror=uninitialized] return ps4Sensor;
When I trying to use this library in conjunction with an SD card - esp32 hangs on PS4.begin. If I comment out PS4.begin the rest of the code works successfully. If I physically unplug the SD card adapter, the library runs successfully. SD card connect via SPI. Does anyone have an idea how to fix this?
I don’t see any issue why it should not connect . Could you please check on internet for possible other solutions as well ? Hope we get your problem solved .
@@TheSelfUnemployed i saw what u mentioned and I've tried those too .. If ur using a specific method to reset the controller please could u link a tutorial? To the erase code .
ets Jul 29 2019 12:21:46 rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0030,len:4832 load:0x40078000,len:16460 load:0x40080400,len:4 load:0x40080404,len:3504 entry 0x400805cc E (88) quad_psram: PSRAM ID read error: 0xffffffff, PSRAM chip not found or not supported i got this and no blutooth mac address
Hi, im currently having issues with the PS4 Controller Library with the error being c:\Users\User\Documents\Arduino\libraries\PS4Controller\src\PS4Controller.cpp:3:10: fatal error: esp_bt_defs.h: No such file or directory #include ^~~~~~~~~~~~~~~ compilation terminated. exit status 1 Compilation error: exit status 1 i wonder if anyone could help, thankyou
@@hashincludeelectronics yes ive already installed all of the required library and board managers and followed the steps as shown in the video, ive also tried reinstalling the arduino ide, and using an older version of the esp32 boards manager
@@hashincludeelectronics mene mac address ps4 controller mai insert kar Diya hai or code bhi complie ho raha hai without any error but esp32 or ps4 controller connect nhi ho raha hai?
Its not working for me. I have esp-wroom-32. I have uploaded the connect code and pressed the home button on the ps4 controller but its not connecting even after many attempts. What can I do??
@@RoboCoderXX i have provided one step where you can clear all the existing Bluetooth paired devices from esp32. Not sure if that’s the problem . Please check that step and perform it first .
@@hashincludeelectronics I am having the same problem. Bought a generic ESP-WROOM-32 ESP32 board on amazon. Got through your tutorial perfectly. My problem is that PS4 controller keeps flashing and won't connecting. I did the mac address and removed the previously paired device code that you posted. Any idea? The weird thing is that no matter how many times I run the removed paired device code it keeps finding devices in the list of paired devices. I listed them out to serial to see what it was removing. I cant get that list to be zero.
@@hashincludeelectronics so I took off another ESP Wroom 32 used a project, and It was running well, I think that some kind of board problem or maker issue THANK YOU!
how to get the esp_bt_defs.h library? fatal error: esp_bt_defs.h: No such file or directory 3 | #include | ^~~~~~~~~~~~~~~ compilation terminated. Alternatives for esp_bt_defs.h: [] ResolveLibrary(esp_bt_defs.h) -> candidates: [] exit status 1
Anyone else getting errors like esp_bt_defs.h not found when verifying the code? Bc i can't find a fix... C:\...\libraries\PS4Controller\src\PS4Controller.cpp:3:10: fatal error: esp_bt_defs.h: No such file or directory 3 | #include | ^~~~~~~~~~~~~~~ compilation terminated. exit status 1 Compilation error: exit status 1
Hi guys , I have observed that you guys are sometimes facing issue while pairing the controller . I would suggest try changing the usb cable and issue should be fixed 👍🏻👏🏻
Thank you very much bro I immediately subscribed from a long time ago, this is a very extraordinary project actually and I am very excited to want to follow the steps, but I'm not so excited bro because the Sixaxis pairtool application does not detect my PS 4 address.
Please really bro how do I handle it even though I'm already excited?
Hello, I have a question, will a duplicate fake PS4 controller work?
@@TheRealUtkarsh yes it will . Give it a try 👍🏻👏🏻
@@hashincludeelectronics bro it connects sometimes or else it gives me "
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1288
load:0x40078000,len:13872
load:0x40080400,len:4
ho 8 tail 4 room 4
load:0x40080404,len:3048
entry 0x40080590
E (276) quad_psram: PSRAM ID read error: 0xffffffff, PSRAM chip not found or not supported
Ready."
and the controller doesnt connect please help me out
I noticed if the PS4 controller is connected to anything else previously like my PC then it wont connect to the esp32 even if PC's blutetooth is off. I previously had my ESP32 robot connected to the PS4 controller successfully then i wanted to play some PC games with the controller and reconnected to my PC bluetooth. After doing this i could no longer connect to the ESP32's bluetooth to control the robot. I used the code to wipe all the BT connections on the ESP32 provided in the description and it reconnected with the PS4 controller after wiping the esp32 and I was once again able to control the robot. But now i cant connect to the PC to play games so, as a fix; it seems i need to reset the controller via the tiny hole and reset button on the back of the controller and then I can successfully connect to my PC's bluetooth for gaming. This does disconnect me from the esp32 permanently until i run the BT wipe code and reconnect the controller to the esp32's bluetooth but at least there are solutions.
hope this long winded comment helps out some of you out there.
Thank you very much for sharing this information. Definitely it’s useful 👌🏻👏🏻👍🏻
yo thanks man , had the same issue
Great tutorial. Please note that mods to library files are incorrect. Need to leave line 87 un-commented and comment out line 89. Your solution gives a complie error "too few arguments to function ". Also, I needed top add this at line 43 of PS4Controller.cpp : "#define ESP_BD_ADDR_STR "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx"". Now everything works. Thanks
Nice 👌🏻
You rule man!
Which Version of Arduino IDE were you using? I havent gotten the same compile error but My controller will not pair
Your my inspiration tonyjohnson
After two days of trying with a very cheap controller from Amazon that did not connect with the sixaxispairtool, I broke down and paid $64 for an official Sony PS4 controller. That controller did connect to sixaxispair tool and I can set the MAC address. Now, like many persons, it does not connect to the ESP32. I notice in your diagram that you have a 38 pin esp32. I am going to try different ESP32 boards and see if a different one will connect. Dronebot workshop is doing similar work with PS3 controller. I might try his code also.
Try using the newer version of the sixaxis pairing tool. 0.2 won’t work with modern service packs of windows 10a
Wonderful, every thing works great up to the point that the six axis pair tool will not recognize/ does not see my PS4 controler......now what?
Please try to use different usb cable . Also try different usb port 👍🏻👏🏻
Followed your step with PS4 controller and ESP32-WROOM-32, did not work.
did you found a solution ?
Please make tutorial PS4 Connect with ESP32-C3 Supermini.. thanks
Excellent work, the only problem I had was linking the PS4 controller to the esp32, I solved it by leaving the library code as it is, after that it was linked correctly to the esp32
Thanks for checking out the video and nice comment . Yes that’s because of you must be using new version of esp32 board . Good that you had it resolved 👏🏻👏🏻
When i commented those lines the code didn't compile, so i uncomment and it works, thanks!
Awesome 👏🏻
Hey harsh it's working but when i remove the cable which is connected to the laptop and esp32 and connet the esp32 to my car it doesn't connect with my ps4 controller
Please follow exact steps in video . Also use only rechargeable battery to avoid power issues 👍🏻👏🏻
I use original ps4 controller and it has to click home button and share button in the same time to connect the bluetooth but it doesnt want to connect with the esp32
ohne dich 0 punkte bruder, bist der beste ehrlich wüssten nicht was wir ohne dich machen würden
Thank you very much 👍🏻👏🏻
You can fix the compilation bug by replacing in ps4_spp.c the line (89) "esp_bt_gap_set_scan_mode(ESP_BT_SCAN_MODE_CONNECTABLE);" by "esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE);"
After commenting those lines of code I get an error when compiling "error: 'ESP_BT_SCAN_MODE_CONNECTABLE' undeclared (first use in this function); did you mean 'ESP_BT_NON_CONNECTABLE'?
esp_bt_gap_set_scan_mode(ESP_BT_SCAN_MODE_CONNECTABLE); ", can someone help me?
you need to comment all 5 lines there out. go back into the notes application where you did that you probably missed a line
@@kirbyfrog7382 thank you so much dear, faced the same problem and now is resolved with your help.love u
For the people that is getting a upload error. Please make sure the cable is able to trasmit data. It happened to me and I got it working immediaty after changing the cable
Thank you 👍🏻👏🏻
Amigo, tentei aqui com vários controles Ps4 mais nenhum tem comunicação com esp32, assisti várias vezes seus vídeos, segui todo o procedimento, porém sem sucesso,
Bruh Loved your video, but only issue is that my controller disconnects after few seconds, so i uploaded your remove paired device program to my esp because of which my esp becomes unable to connect and doesnt show ready in serial monitor. so i have to reupload your Receive Data program and same thing happens all over, hope u could help me out, Please and Thankyou
I think this video explains alot of why the ESP code examples don't work with my contrroller as well: 8bitdo pro2.
Some more information...I have a PS4 controller. It will not connect to the ESP32. When I run the code from Dronebot Workshop for connecting a PS3 controller, it DOES connect to the ESP32. But the data is totally messed up. This is starting to get above my level of understanding. But I would think some smart person out there could utilize the connection algorithms from the PS3 code to get the PS4 to connect.
Great Video, I followed the instructions and it solved the compilation error, But I still can't Pair the controller Which Version of ARDUINO IDE does this work for? (I'm using 1.8.19)
Did you set the mac address in controller ? Try restarting the esp32 👍🏻👏🏻
I couldn't find a safe way to download the sixaxis pair tool, so I found the MAC address of the controller and wrote that as a string into the PS4.Begin() function call in the setup function like "
void setup()
{
Serial.begin(115200);
PS4.attach(notify);
PS4.attachOnConnect(onConnect);
PS4.attachOnDisconnect(onDisConnect);
PS4.begin("a0:ab:51:8d:9x:7c");
Serial.println("Ready.");
}
" The function is used that way in the example codes of the library, but I can't get them to pair. does the fix to the compilation error change the way that this function can be used? I am using the same version esp32 board (1.0.6) that you downloaded from the board manager. but I'm using a ESP32-Wroom-32, so I select "ESP32 devkit" from the board manager (or else I'd get a PSRAM ID error) @@hashincludeelectronics
Please tell me you know how to connect and map an Xbox series S controller. Tx for the video.
Currently I don’t have Xbox controller with me . Will try to get one and create a video on it 👍🏻👏🏻
Awesome. Thanks so much 🙏
It does not work.
Hey can i do this with the Nintendo joy pro?
Not sure exactly . 👍🏻👏🏻
@@hashincludeelectronics gotta try then
Im getting this error when im trying to upload the ps4 controller library, any tips?
A subfolder of your sketchbook is not a valid library
Please copy paste the code properly and put it in only single folder 👍🏻👏🏻
Our HMI displays can work with STM32, ESP32 and Arduino by UART communication.
Could you please make some Sponsored videos for our HMI LCD?
Love from brazil 🇧🇷♥️🇮🇳
Thank you very much 👍🏻👏🏻
hello everyone, Harsh bruh loved your video i was imitating each step you did but at the end the controller wasnt able to connect to the ESP32. After 2hrs of trial and error i found out that the comment(//) in the library had to do with it so this is what worked for me hope it could help u guys.
Line 86, 87, 88, 90 commented(//) and Line 89 uncommented.
Nice 👏🏻👍🏻
which file exactly? ive been fighting the ps4 controller disconnect for a week now, many wipes many removed bonded devices still issues uts driving me insabe controller connects for a second then turns off
@@hecticaperturemake changes in the .src file shown in video.(worked for me)
Try resetting your controller(small switch on the back)
Make sure ur controller is charged to full, mine kept disconnecting after after few seconds, after charging problem solved
This should work
@@haripatel3012 This is incorrect. People that are NOT having the same issue should stop posting useless solutions. Solutions that I have tested extensively (over 10 times each):
Changes to source file in video (this is irrelevant, this is a compile issue)
Charged the controller to full
Used code provided to delete paired devices
Used many other codes online including example on core to remove ALL paired devices
Used ESPTOOL to delete flash
Held the reset button on the back of the controller for intervals between 10 seconds and 5 minutes.
Downgrade ESP32 board to versions from 2.0.12 to 1.0.6 (this code is completely broken for 3.0.0+)
Tried ALL this over 10 times each with 3 different controllers
With over 2 weeks of constant research, it is irritating that people that literally have no clue try to give advice. Its OK not to know the answer, its OK for you to not be knowleadgable. It is not valuable to LOOK like you gave help instead of actually helping.
If you dont know an actual answer please do not waste anybodys time replying with irrelevant information.
thanks
Hey harsh it's working but after I remove the cable of ESP32 and connect it to my car the PS4 controller doesn't connect
why, after commenting out the file in ps4_spp, the error comes out note: declared here
esp_err_t esp_bt_gap_set_scan_mode(esp_bt_connection_mode_t c_mode, esp_bt_discovery_mode_t d_mode); . And if you do not comment on this line, then everything works, but the ps4 controller does not connect
It’s working for me without commenting line as well 👍🏻👏🏻
Hi, I uploaded the codes perfectly, but don’t see any controller outputs on the serial monitor
Please check the video for any missing step 👍🏻👏🏻
Hello, thank you very much for your video, I have a question, when I uploaded the code for minute 2:30, it gave me an error that told me that in line 89 of the ps4 controller script, there was data that I did not recognize, I commented on that line and the problem was fixed and I was able to upload the code, but when I tried to connect the controller later, it does not recognize it, is it necessary to have the code for line 89?, or am I doing something wrong
Thanks for checking out the video 👏🏻👍🏻. Yes you need to fix that error. Please don’t ignore any line of code . 👍🏻
@@hashincludeelectronics Thank you for your answer, I have another question, looking at my esp32 module I realized that it is the esp32S module, does the code work the same with this version of the board?
@@pedromagneordonez7167 yes it should .
The pair tool doesn't show any device connected. Does it not work with an official PS4 Dualshock controller?
It should work with that controller too . Try using different cable .
@@hashincludeelectronics do you need the specific kind of cable you were using? I'm using a micro usb is that a problem?
Mr Hash: can you please post the exact model number of the ps4-controller that you are using so I can try and find one of the same model. The one I have does not connect to the 'sixaxis pair tool' so I am unable to get passed that stage. I have managed to retrieve the BT MAC for my ESP32 DevkitC v4, and I am able to use my Lenovo M10 android tablet with various BT 'scanner apps' to 'find' the ps4-controller and to 'pair' my tablet with it. Some of these apps also told me the BT MAC of the ps4_controller which could be helpful. So I have BT MAC's for both sides of the ESP32/PS4_controller pair but am unable to complete the 'sixaxis pair tool' process. The model of ps4_controller that I currently have is CUH-ZCT-2U and came from Aliexpress. No specific make shown.
I now know that the reason my 'sixaxis pair tool' process is failing is because my ps4-controller device is not installing on the USB correctly. The Device Manager shows "Unknown USB device(Device Descriptor Request Failed)". So I guess there is nothing I can do about that other than find a different device.
@@kerimensshed I also have a similar controller (CUH-ZTCT2E) from aliexpress. And the same problems. The 'sixaxis pair tool' can't see it.
@@andreyl2705 that is interesting, I thought it was just me. I have noticed that when I plug the PS4_controller into my PC USB port, the PS4_controller goes into 'charge mode' and cannot turn on. I have a special USD plug that isolated the charging wire and that allows the controller to attempt to install the usb connection, but that also fails with an 'unrecognised device' message. What I do not get is why so many other do not seem to have this issue.
I tried with two different ESP32 chips. None worked. An ESP-WROOM-32, and an ESP32-CAM. Code compiled, is uploaded, bluetooth address is shown. But my official PS4 controller won't pair.
Try to restart the esp32 while connecting 👏🏻👍🏻
Did you update the MAC address properly into controller. ?
amazing... thats all i can say... simple and straight forward...
Thank you very much for checking out the video and nice comment 👍🏻👏🏻
Can i use this for Xbox series x controller? If not is there any libraries? Can you make a demo?
No you can not use this for Xbox controller . I did not find any library for that yet . Will let you know if I come across one 👏🏻👍🏻
Can i use my personal ps4 controller or do i have to by a clone version? also the link you posted to the controller is not working anymore
You can use any PS4 controller 👍🏻👏🏻
Thanks so much for this tutorial. I'm fairly new to Arduino and connectivity like this but was able to pair up my PS4 controller to an esp32 and got the LED's from the test code to work. Excited to learn more and watch your other videos. Thank you for the time and effort you've put in to making these.... There isn't much documentation on these ESP32 boards that I could find, but I was able to figure out how to upload the sketch from previous drone building days where you had to hold buttons on power up to load into bootloader. On my ESP32 board I had to plug in, hold one button while pressing the other and I saw in serial monitor that got me in bootloader and gave message ready to download. However when I uploaded the sketch the com port would time out and say bootloader not ready. So after hours of trial and error, I uploaded (compiled) the sketch and when it gave the message of connecting to com port - I did the bootloader sequence on the board and sure enough it started writing the sketch to the board. I'm not sure if this is specific to the board I got off Amazon - but it sure did take a lot of tinkering and maybe some luck to figure this out! Maybe this comment will help someone else!
Thank you very much for checking out the video and nice words . Surely this will help others if they face issue while working with esp32. Thanks for sharing experience 👏🏻👍🏻
@@hashincludeelectronics Any idea how to map the r2 button to specific servo location/angle? I want to use that button on a servo similar to using a pot with a servo - but everything I'm finding is for pots and it's not quite working out - the r2 button works to control servo, but it's either moving full rotation or nothing - it wont, for instance hold a position in half rotation if I was to press r2 half way down... even though it shows the r2 value correctly in serial monitor going from 0 to 255 as I depress it... I'm stuck, but I bet it has something to do with the r2 button not actually being an analog pot. which is what all the tutorials are showing - Any ideas / suggestions?
@@kevbomtb6078 how do you read the value of r2 button ? Which variable do you use ?
@@hashincludeelectronics
void loop() {
val = analogRead(PS4.R2Value()); // read the value of the R2 button (value between 0 and 255)
Serial.printf("Non-Map Value at %d
", val); //
delay(600);
val = map(val, 0, ADC_Max, 0, 180); // scale it to use it with the servo (value between 0 and 180)
myservo.write(val); // set the servo position according to the scaled value
Serial.printf("Mapped Value at %d
", val);
Serial.printf("PS4 R2 Value at %d
", PS4.R2Value());
delay(600);
Delay and print outs are just for trying to figure out what's going on -
This is what I'm seeing in serial monitor:
The first loops are without pressing, the last loops are with the R2 pressed. - it's not showing what I'd expect. ADC_Max is set to 4095.
Non-Map Value at 4095
Mapped Value at 179
PS4 R2 Value at 0
PS4 R2 at 0
Non-Map Value at 4095
Mapped Value at 179
PS4 R2 Value at 38
PS4 R2 at 1
Non-Map Value at 0
Mapped Value at 0
PS4 R2 Value at 255
PS4 R2 at 1
Non-Map Value at 0
Mapped Value at 0
PS4 R2 Value at 255
PS4 R2 at 1
@@kevbomtb6078 I got the problem . Don’t read the value using analogRead. The value is already given by PS4.R2Value(). This value itself is from 0-255. So use this value as it is in map function . val = PS4.R2Value(); val = map(val, 0, 255, 0, 180); and use this val for servo .
i want to ask, how if you use that controller, to controll 8 pcs ESP32. Its mean 8 controller controll 8 pcs ESP32. How to add a addres to that?
You want to control 8 esp32 with single controller ? Or 8 esp32 with 8 controllers ?
@@hashincludeelectronics 8xESP32 controlled by 8 controller. Isnt need a different addres for that?
@@ipkosalim1667 it’s easy then . Each esp32 will have different MAC address 👍🏻. Check it .
Hi I am using a ASPIS 3 wireless controller and when I am trying to search with the SixaxisPairTool it doesn't find any device. Do you have any idea why?
Please check the video for proper steps .
Can we use other controller like redgear cosmic byte Logitech etc for rc bots
In this video we have to use only ps4 controller of any company . 👍🏻
i am satisfied with the customer service
Awesome 👏🏻
@@hashincludeelectronics rearry good
Hi I use this library but my servo is not moving smoothly, what might be the error?
Not sure how did you code for servos . May be add some delay before changing the servo position . Also increase/decrease the servo angle in each step . 👏🏻👍🏻
i already change mac adress to make it the same,using 2 method, getting adress from saved address from controller then pasted on esp32,and getting esp32 address then write to the controller,but it doesnt work for me,i already comment some line on ps4spp files like in the video,but doesnt work,when im pressing home button led just blinking then turned off,then im trying to connect my controller to pc for testing playing some games its just fine,then im trying connecting esp32 bluetooth with my android using SerialBluetooth example and its perfectly fine, i mean both device function just normal,but still didnt work when trying to pairing my controller to the esp, need help here
Thanks for checking out the video 👌🏻👍🏻. Could you please try clearing the Bluetooth devices as suggested in video ?
@@hashincludeelectronics yes i did it too, but still didnt work
I've been having issues with pairing a generic PS4 controller with my ESP32. Initially, I downloaded the SixaxisPairToolSetup-0.3.1 program to change the MAC address. However, when I enter the code, compile it, and try to pair it with the controller, it blinks about 3 times and stays on for only 2 seconds before turning off. Now, after trying the same code multiple times, the controller keeps blinking until it turns off. Any ideas on what could be causing this issue? Why isn't it working? Thank you.
Sometimes you need to restart the esp32 board 👏🏻👍🏻
Sir, can you make a video on youtube on how to make the Xbox 360-controlled 6 dof robotic arm car?
Nice idea . Sure will try 👍🏻 It will also cover one of the controller 😜 we already have video on PS3 and PS4 .
Sir, are you an electrical engineer, sir, what courses and which diploma, or degree do you do to get in the robotics field, tell me?
@@fouzanjaved5441 I am electronics and communication engineer .
Same process for Dualsense? I wanna use a PS5 controller.
Please check my video on PS5 controlller with esp32 👍🏻👏🏻
I've been trying for 4 days and I couldn't connect, I do everything you explain in the video and it won't
Commenting out the 3 lines in the src file gave me a compliation error, but leaving them un-commented worked just fine
Thank you 👍🏻👏🏻
At 2:27 when you select port, then COM12 I don’t have the 12 option, only 3, 4, 5, 6, 7, 8,
Com ports are different for different users based what already being used on the computer . So this can be connected to any available port . Try selecting the ports which are shown to you in Arduino ide .
I bought 3 different ps4 controllers from amazon. they all do the exact same thing. followed all the steps in the video, tried every suggestion made by others in the comments. everything seems to work up until time to pair the controller. all 3 controllers just flash and turn off after a few min. None ever connect. I cleared previous bt paired devices, but there are none. esp32 is brand new. Never hooked anything to bt yet. all controllers new out of box, not connected to anything but the PC via usb to set master mac. Tried to make changes suggested by Tony Johnson, "Need to leave line 87 un-commented and comment out line 89. Your solution gives a complie error "too few arguments to function ". This gave me compile errors. but it worked with the edits in the video (maybe difference in version of librarys or board?) Tried "add this at line 43 of PS4Controller.cpp : "#define ESP_BD_ADDR_STR "******".(my esp32 mac address) and this didn't seem to do anything for me one way or another. Granted none of my controllers are the exact one used in this video, but all very similar. And my esp32 is just an amazon "AITRIP 2 Sets ESP-WROOM-32 ESP32 ESP-32S Type-C USB Development Board"
What versions of software is everyone running? what esp32 library version? what ps4 version? what IDE version? I am going to try to order the exact controller and try again... but i think i will have the same results.
I bought a real sony PS4 controller and it worked with the original library with no modifications right off the bat. simple as anything. Cant believe i spend 2 days trying to get generic controllers to work. apparently most of the generic ps4 controller now are just generic game pads, or xbox controllers made to look like a ps4 controller.
@@kensoggs so its perfectly fine with original ps4 controller ,but didnt work with 3rd party or clone ?
@@absky14r yes, i bought a used original controller and it worked perfectly. but could not get a off-brand control to work AT ALL.
@@kensoggs damn,at the end im using ps3 controller for my project,it works perfectly fine with original or clone,oh even with that ps4 controller code u still can use ps3 controller connected aswell
hi@@absky14r I'm sorry but how you solve the problem that you had previously? I have issue that my pc can't read PS4 and also my PS4 can't connect to ESP32... I did many things but still it doesn't work until now. Could you give me some advice?
Hello dear friend, thaks for the excellent Tutorial. I have a question can i connect a esp32 to ps4 as a controller?
No as of now I don’t have any idea about it 👍🏻👏🏻
Great video. Is this possible to do with an Xbox one controller, assuming it has Bluetooth? Will I have to have a completely different code and is that available anyware?
Thanks for checking out the video . Unfortunately there is no support for xbox controller in this library.
@@hashincludeelectronics I borrowed a PS4 controller from a friend, your code worked perfect and your video is super easy to follow. Thank you so much for this video!
First of all, thanks for the clear explanation. I encounter the same problem with the re-connection issue. I've tried in the remove pairing and can be connected again, but only once. Is there any better solution on this issue? Thanks in advance.
Yes, same problem. PS4 disconnects after few seconds when I use this to control my car with this what should I do?
@@pramukhjain1742 i have the same problem, i try with a new esp32 and a new controller but i dont know whats the problem
one year later still the same problem this is insane
@@hecticaperture i faced the same and i found the solution if u still intrested or any one in the future is the solutions is : to erase esp flash using esptool in python
@@osamaabdelmohsen5729 Already tried that the issue eventually always comes back
can this be done with the actual DS4 controller? the playstation one
Yea you can use any PS4 controller 👍🏻
@@hashincludeelectronics i've tried to connect to the ps4 after uploading the receive data code. in the video you just pressed the 'home' button while on my ps4 controller, the center button is the playstation button. after i pressed the button, it isn't connected as yours. so there's no reading on the serial monitor, just the status 'ready'
Im working with 2 different wroom from 2 different sellers, they are not connecting to the controller after triple checking everything. i see there are multiple people with this issue. is this an issue with the board or the user?
Could you please check the last part of video where I have suggested how to clear all existing Bluetooth settings ? That might help you .
Hi, does this procedure work for ESP32CAM?
It’s should work . Give it a try 👍🏻
@@hashincludeelectronics can you help me? Do you think that its possible?
@@federiconavecilla8713 try uploading this same code on esp32 cam. Check my other videos on esp32 cam 👍🏻
hi,NodeMCU32s can used?
No we need to use only esp32 in this project 👍🏻
@@hashincludeelectronics this code not support NodeMCU32s?
my dual controler not connted
Great tutorial. I have the Arduino Nano IOT 33 which I would like to connect to my PS4 controller, any chance that you already have a tutorial for that as well?
Sorry don’t have specific video for that module . However you can check if there is any library for this. This module works on python coding ?
@@hashincludeelectronics There is a ready made library called "bluepad32 " made by Ricardo Quesada. in order to work with that, the Nina module on the Nano IOT board need to be flashed with the required firmware. the flashing process is not that easy for some like me who has no experience with firmware flashing...
@@haimn1193 agree . Flashing new firmware is difficult . You can check for more information on net . Hopefully you will get something in this direction 👍🏻
hello, I loved your video and I wanted to try it but when commenting on the lines it still shows me an error and I don't know what to do because I'm new to robotics
Thank you for checking out the video 👏🏻👍🏻. What exact error do you get ?
@@hashincludeelectronics when I load the code I get: /home/student/Arduino/libraries/PS4-esp32-master/src/ps4_spp.c: In function 'sppCallback':
/home/student/Arduino/libraries/PS4-esp32-master/src/ps4_spp.c:89:30: error: 'ESP_BT_SCAN_MODE_CONNECTABLE' undeclared (first use in this function); did you mean 'ESP_BT_NON_CONNECTABLE'?
esp_bt_gap_set_scan_mode(ESP_BT_SCAN_MODE_CONNECTABLE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ESP_BT_NON_CONNECTABLE
/home/student/Arduino/libraries/PS4-esp32-master/src/ps4_spp.c:89:30: note: each undeclared identifier is reported only once for each function it appears in
/home/student/Arduino/libraries/PS4-esp32-master/src/ps4_spp.c:89:5: error: too few arguments to function 'esp_bt_gap_set_scan_mode'
esp_bt_gap_set_scan_mode(ESP_BT_SCAN_MODE_CONNECTABLE);
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/student/Arduino/libraries/PS4-esp32-master/src/ps4_spp.c:4:
/home/student/.arduino15/packages/esp32/hardware/esp32/2.0.5/tools/sdk/esp32/include/bt/host/bluedroid/api/include/api/esp_gap_bt_api.h:480:11: note: declaredhere
esp_err_t esp_bt_gap_set_scan_mode(esp_bt_connection_mode_t c_mode, esp_bt_discovery_mode_t d_mode);
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/student/Arduino/libraries/PS4-esp32-master/src/ps4_parser.c: In function 'parsePacketSensor':
/home/student/Arduino/libraries/PS4-esp32-master/src/ps4_parser.c:278:10: error: 'ps4Sensor' is used uninitialized in this function [-Werror=uninitialized]
return ps4Sensor;
is it possible to get analog values for l2 and r2 or only digital?
Yes it’s possible . Check the sample example code in the Arduino ps4 library . 👍🏻
Thanks a lot😊
When I trying to use this library in conjunction with an SD card - esp32 hangs on PS4.begin. If I comment out PS4.begin the rest of the code works successfully. If I physically unplug the SD card adapter, the library runs successfully. SD card connect via SPI. Does anyone have an idea how to fix this?
May be the SPI pins are interfering with other pins used in the project .
@@hashincludeelectronics For the purity of the experiment unplugged all except the SD card. The result is the same.
Hi, Sixaxis Pair Tool does not find my PS4 controller, it remains as no device found.
I don’t see any issue why it should not connect . Could you please check on internet for possible other solutions as well ? Hope we get your problem solved .
Sorry, unfortunately I don't get a Bluetooth mac address on esp32.
What am I doing wrong?
What do you see on serial monitor ?
@@hashincludeelectronics The controller does not connect to the ESP32 module despite the entered Mac address of the esp32.
hi ,i followed the procedure but the code just shows ready and doesnt connect . can you help?
Please check the video properly and slowly if any step is missed .
checkout my reply posted above
@@TheSelfUnemployed i saw what u mentioned and I've tried those too .. If ur using a specific method to reset the controller please could u link a tutorial? To the erase code .
How do I pair any remote with bluetooth to the esp32?
Which remote you have ?
@hash include electronics i have a ps4 controller but i want to do the same with this video with any controller if it has bluetooth
hello brother im using esp-wroom 32 im not getting the blutooth address kindly guide me how i will get the blutooth address
@@mitusiqba6790 all the steps are provided in the video . Please check it slowly and carefully 👍🏻👏🏻
@@hashincludeelectronics i did just like you but haven`t got it
ets Jul 29 2019 12:21:46
rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:4832
load:0x40078000,len:16460
load:0x40080400,len:4
load:0x40080404,len:3504
entry 0x400805cc
E (88) quad_psram: PSRAM ID read error: 0xffffffff, PSRAM chip not found or not supported
i got this and no blutooth mac address
Hi, im currently having issues with the PS4 Controller Library with the error being
c:\Users\User\Documents\Arduino\libraries\PS4Controller\src\PS4Controller.cpp:3:10: fatal error: esp_bt_defs.h: No such file or directory
#include
^~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Compilation error: exit status 1
i wonder if anyone could help, thankyou
Did you install PS4 controller library ? Please do so .
@@hashincludeelectronics yes ive already installed all of the required library and board managers and followed the steps as shown in the video, ive also tried reinstalling the arduino ide, and using an older version of the esp32 boards manager
@@hashincludeelectronics nvm got it working already. thanks
@@mohmazter man, How?
Can i use my original ps4 controls using this step
Yea you can
I need long distance antena control. No bluetooth.
You can check my other car videos on nrf24l01 and ESPNOW protocol as well 👍🏻👏🏻
can i use an xbox one controller instead of the ps4 controller. halp pls
Sorry it can not support xbox controller.
Bro please help,esp32 and ps4 not connecting so any solution,
Try using different cable 👍🏻👏🏻
@@hashincludeelectronics already try
@@hashincludeelectronics mene mac address ps4 controller mai insert kar Diya hai or code bhi complie ho raha hai without any error but esp32 or ps4 controller connect nhi ho raha hai?
@@RUclips-AAREX-GAMING try restarting the esp32 . And then connect PS4 controller .
@@hashincludeelectronics ok
Excelente, gracias
Thank you 🙏
can't you make R2 and L2 also analog
I believe so . Please check the library 👍🏻👏🏻
Thank you, my friend
You are welcome 🙏
Excellent !!
Thank you very much 👍🏻
Its not working for me. I have esp-wroom-32. I have uploaded the connect code and pressed the home button on the ps4 controller but its not connecting even after many attempts. What can I do??
Please set up the PS4 Controller mac address first. Check this step properly. Then upload code into esp32 module and try to connect.
@@hashincludeelectronics I have already done it.
@@RoboCoderXX i have provided one step where you can clear all the existing Bluetooth paired devices from esp32. Not sure if that’s the problem . Please check that step and perform it first .
@@hashincludeelectronics I am having the same problem. Bought a generic ESP-WROOM-32 ESP32 board on amazon. Got through your tutorial perfectly. My problem is that PS4 controller keeps flashing and won't connecting. I did the mac address and removed the previously paired device code that you posted. Any idea? The weird thing is that no matter how many times I run the removed paired device code it keeps finding devices in the list of paired devices. I listed them out to serial to see what it was removing. I cant get that list to be zero.
Can we do the same in micropython?
Unfortunately I am not sure about how to do it in micropython 👍🏻👏🏻.
Sir i have evo fox ps4 controller and it is not working
Please follow exact steps . Try again 👍🏻👏🏻
@@hashincludeelectronics I followed the exact steps it is working on the original controller but not with EVO Fox controller
hi how to reset current master back?
Follow the same step with master address 👍🏻👏🏻
@@hashincludeelectronics but the address has been lost, and I did not record it
will the controller still connect to ps4?
No. Because we are updating the master address in the ps4 controller . You will have to again update the master address as your PS4 .
checkout my reply posted above
I have use any other brand controller
You can use any brand 👍🏻👏🏻
my controller is not connecting to esp .what can i do ?
Please check the video slowly and carefully 👍🏻
I've done it successfully 1 time but can't again. how to handle it
Check the last step in video to clean up Bluetooth devices .
@@hashincludeelectronics yes i have try. But cant conecting now
I've tried in the remove pairing video. can be connected. but when trying to sketch receive data . can not connected. How to
In ESP-WROOM-32 ESP32 It is not RUNNING!!!
many people said the same issue.
this time you should check it out with esp-wroom-32
I am using esp wroom 32 module in this project .
@@hashincludeelectronics ok thank you but you are using ESP32 Wrover module. 2:26 you can check it out.
@@hashincludeelectronics 2:41 PSRAM ID read error I checked. so your module is not Wrover moudle. j
@@hashincludeelectronics so I took off another ESP Wroom 32 used a project, and It was running well, I think that some kind of board problem or maker issue
THANK YOU!
@@흠이건-i4e while uploading the code , the wroover board also works. It’s compatible.
Amazing but I can't try this 😅
It’s not costly and you can get this remote controller easily . May be try it later once you a chance .
@@hashincludeelectronics ok
Sir can u tell this video in hindhi language sir
Uck da vadakaa
Do I have a ps5?
Please check my video on esp32 with ps5 controller 👍🏻👏🏻
Sir, esp32 can't connect ps4 at all while could connect to pc. Can't solve. Please suggest.
Ps. it's a fack ps4.
Please check all the steps properly . Make sure to Set up the MAC address of esp32 into ps4 controller .
Thank you. Will try again
Well 98% of this worked up to the point of hitting the PS4 button to connect to the ESP32.......Absolutely no response, no connection.🙁Bummer.
Strange . It should have connected . Try restarting esp32 👍🏻👏🏻
soj un puto amo
how to get the esp_bt_defs.h library?
fatal error: esp_bt_defs.h: No such file or directory
3 | #include
| ^~~~~~~~~~~~~~~
compilation terminated.
Alternatives for esp_bt_defs.h: []
ResolveLibrary(esp_bt_defs.h)
-> candidates: []
exit status 1
You need to install the esp32 board. Please check the video for this step.
@@hashincludeelectronics but it is installed
Anyone else getting errors like esp_bt_defs.h not found when verifying the code? Bc i can't find a fix...
C:\...\libraries\PS4Controller\src\PS4Controller.cpp:3:10: fatal error: esp_bt_defs.h: No such file or directory
3 | #include
| ^~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Compilation error: exit status 1
Have you installed esp32 board ?
I have yes, when i look it up it keeps bringing me to ESP-IDF@@hashincludeelectronics
Problem is gone now. I think i just selected the wrong board.
No more late night coding for me xD
@@hashincludeelectronics
Nothing working!
fatal error: esp_bt_defs.h: No such file or directory
#include
^~~~~~~~~~~~~~~
compilation terminated.
Please check the video for any missing step 👍🏻👏🏻
Bro isn't using a ps4 controller he is using a sp400 controller from ohio