Using PS3 Controlle...
 
Notifications
Clear all

Using PS3 Controllers with ESP32 | Build Custom Remote Controls

91 Posts
11 Users
9 Likes
5,208 Views
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1016
 

@alanl 

Will let you know what I find out after trying some other USB cables.

SteveG


   
ReplyQuote
AlanL
(@alanl)
Member
Joined: 3 years ago
Posts: 34
 

SteveG 

I have tried the SixAxis Pair Tool  on 3 machines, 2 Widows 10 and 1 Windows 11, all 3 reconised that the PS3 controller had been conected and the tool say "Searching..". I have left it searching on each machine for several hours and still no results.

That is why I'd like the name of a controller supplier tha does connect and display the controllers MAC addres so that i can change it to the required address.


   
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1016
 

@alanl 

Here is a link to the product I purchased on Amazon.  PS3 Controllers

I have yet to try different USB cables other than the two that came with these controllers.

BTW, the description of these controllers on Amazon states: "Come with 2 charge cables."  Charge only, no data?

SteveG


   
ReplyQuote
AlanL
(@alanl)
Member
Joined: 3 years ago
Posts: 34
 

Have you had succcesfull connections and do they display the contollers MAC?

Here is the code I use to detect connection:

#include void setup() { Serial.begin(115200); Ps3.begin("81:00:22:02:0b:aa"); // Ps3.begin("00:00:00:00:00:00"); Serial.println("Initialization finished."); } void loop() { if (Ps3.isConnected()) { Serial.println("Controller connected!"); } else { { Serial.println("Failed to connect!"); } } delay(1000); }

I used the MAC 81:00:22:02:0b:aa in the sample code as this was obtained using sixaxispairer , but that didn't work either!


   
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1016
 

@alanl 

Haven't dug up a working USB cable yet!

Your code is very hard to understand.  You need to take a look at the help topic on including code.  And what is the "# include" at the beginning?

SteveG


   
ReplyQuote
AlanL
(@alanl)
Member
Joined: 3 years ago
Posts: 34
 

SteveG

I used the {:} to upload the code, this time  i've used <> (as seen) below.

The code is from the Arduino 2.0.4 IDE and the selected board is DOIT ESP32 DEVKIT 

Have you tried your PS3  controllers (as per your previous Amazon link) to change the MAC address sucessfully with the SixAxis Pair Tool yet?

 

#include <Ps3Controller.h>

void setup() {
  Serial.begin(115200);

  Ps3.begin("81:00:22:02:0b:aa");
  // Ps3.begin("00:00:00:00:00:00");

  Serial.println("Initialization finished.");
}

void loop() {
  if (Ps3.isConnected()) {
    Serial.println("Controller connected!");
  }
  else {
  {
    Serial.println("Failed to connect!");
  }
  }

  delay(1000);
}

   
Ron and codecage reacted
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1016
 

@alanl 

Much, much better on the code!

And no, I have not been able to access a MAC address as the only cables I have tried are the ones that came with the controllers, and they seem to be power only cables.  It's going to be later this morning or this afternoon before I'll be able to try a data cable as well.

SteveG


   
ReplyQuote
AlanL
(@alanl)
Member
Joined: 3 years ago
Posts: 34
 

SteveG

An Aduino cable for the NANO would be a good choice.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6482
 

@alanl Please take the time to read the HELP about how to post code. Help is right side below your 'My Profile' section and before Recent Posts.

If what you posted looks anything like what is in your IDE, it is nonsense, try again cuz something went very wrong.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
AlanL
(@alanl)
Member
Joined: 3 years ago
Posts: 34
 

That link is not working, it goes to the same place as the forum page( https://forum.dronebotworkshop.com) even though the link is: https://forum.dronebotworkshop.com/add-code/

When I used {:} (Source code) SteveG couldnot read it so I used <> (Code) and that looks like the IDE.


   
ReplyQuote
codecage
(@codecage)
Member Admin
Joined: 5 years ago
Posts: 1016
 

@alanl, @zander, & @dronebot-workshop

AlanL seems to be right about the help links not working properly.  To me thay all just seem to jump to the Welcome page.

And Ron, AlanL has reposted his code using the correct methodology.

SteveG


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6482
 

@codecage I see, looks much better. No idea why not working.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
AlanL
(@alanl)
Member
Joined: 3 years ago
Posts: 34
 

SteveG

I don't mean to stir up trouble  I am just after a controller that responds to the SixAxis Pair tool


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 6482
 

@alanl Either use the REPLY link or if you manually type it preceding the user name with the @ symbol. For instance, I am Ron but my handle is @zander.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
AlanL
(@alanl)
Member
Joined: 3 years ago
Posts: 34
 

@zander Thanks for that, I'll remember it in future.


   
Ron reacted
ReplyQuote
Page 2 / 7