Pairing a PS4 Controller to the HUZZAH32

For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
novi
 
Posts: 7
Joined: Wed May 04, 2022 1:39 pm

Pairing a PS4 Controller to the HUZZAH32

Post by novi »

I'm trying to pair a gen 1 PS4 controller to the HUZZAH32 ESP32 Feather. I'm using Arduino IDE. I'm getting no connection and I have no idea why. Also the serial.println under void setup does not show on the serial monitor.

Code: Select all

#include <PS4Controller.h>

void setup() {
  Serial.begin(115200);
  Serial.println("Initialization ready!");

  PS4.begin("01:01:01:01:01:01"); 
//example MAC address
  
  // put your setup code here, to run once:

}

void loop() {
  if(PS4.isConnected()) {
    Serial.println("Controller connected");
  }

  delay(1000);
  // put your main code here, to run repeatedly:
}

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: Pairing a PS4 Controller to the HUZZAH32

Post by Franklin97355 »

You might try

Code: Select all

void loop() {
  if(PS4.isConnected()) {
    Serial.println("Controller connected");
  }
  else {
     Serial.println("Not Connected");
     PS4.begin("01:01:01:01:01:01");
  }   
	
  delay(1000);
to see if the program is cycling.
Which PS4 controller are you using and what library?

User avatar
novi
 
Posts: 7
Joined: Wed May 04, 2022 1:39 pm

Re: Pairing a PS4 Controller to the HUZZAH32

Post by novi »

I'm using the dualshock 4 controller with this library I found on GitHub https://github.com/aed3/PS4-esp32

User avatar
novi
 
Posts: 7
Joined: Wed May 04, 2022 1:39 pm

Re: Pairing a PS4 Controller to the HUZZAH32

Post by novi »

So I tried that code you sent, and the serial monitor repeats:

Not Connected
E (16518) PS4_GAP: ps4_gap_init_service Registering GAP service PS4-HIDC failed
E (16518) PS4_GAP: ps4_gap_init_service Registering GAP service PS4-HIDI failed

What does this mean?

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: Pairing a PS4 Controller to the HUZZAH32

Post by Franklin97355 »

We have not tried connecting to the PS4 but you might contact the author of the software to get help with the PS4.

User avatar
novi
 
Posts: 7
Joined: Wed May 04, 2022 1:39 pm

Re: Pairing a PS4 Controller to the HUZZAH32

Post by novi »

Ok thank you

Locked
Please be positive and constructive with your questions and comments.

Return to “Wireless: WiFi and Bluetooth”