Arduino, ESP32 , PS4 controller

When connecting to the PS4 controller and reading the sent data, the ESP goes into error.
Folder Sketch is uploaded.
#include <PS4Controller.h>

void setup() {

void loop() {
// Below has all accessible outputs from the controller
if (PS4.isConnected()) {
if (PS4.Right()) Serial.println("Right Button");
if (PS4.Down()) Serial.println("Down Button");
if (PS4.Up()) Serial.println("Up Button");
if (PS4.Left()) Serial.println("Left Button");

if (PS4.Square()) Serial.println("Square Button");
if (PS4.Cross()) Serial.println("Cross Button");
if (PS4.Circle()) Serial.println("Circle Button");
if (PS4.Triangle()) Serial.println("Triangle Button");

if (PS4.UpRight()) Serial.println("Up Right");
if (PS4.DownRight()) Serial.println("Down Right");
if (PS4.UpLeft()) Serial.println("Up Left");
if (PS4.DownLeft()) Serial.println("Down Left");

if (PS4.L1()) Serial.println("L1 Button");
if (PS4.R1()) Serial.println("R1 Button");

if (PS4.Share()) Serial.println("Share Button");
if (PS4.Options()) Serial.println("Options Button");
if (PS4.L3()) Serial.println("L3 Button");
if (PS4.R3()) Serial.println("R3 Button");

if (PS4.PSButton()) Serial.println("PS Button");
if (PS4.Touchpad()) Serial.println("Touch Pad Button");

if (PS4.L2()) {
  Serial.printf("L2 button at %d\n", PS4.L2Value());
if (PS4.R2()) {
  Serial.printf("R2 button at %d\n", PS4.R2Value());

if (PS4.LStickX()) {
  Serial.printf("Left Stick x at %d\n", PS4.LStickX());
if (PS4.LStickY()) {
  Serial.printf("Left Stick y at %d\n", PS4.LStickY());
if (PS4.RStickX()) {
  Serial.printf("Right Stick x at %d\n", PS4.RStickX());
if (PS4.RStickY()) {
  Serial.printf("Right Stick y at %d\n", PS4.RStickY());

// This delay is to make the output more human readable
// Remove it when you're not trying to see the output


What is the error message?

2021-08-08 06_24_54-Window

Your post was MOVED to its current location as it is more suitable.

Please follow the advice given in the link below when posting code , use code tags and post the code here to make it easier to read and copy for examination

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.