Skip to content

This repo is used for getting data from a ps5 controller without using ROS. It is a standalone library for PS5 controllers

Notifications You must be signed in to change notification settings

ayushkumar8340/PS5_Controller_cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PS5_Controller_cpp

PS5_Controller_cpp is a C++ library to interface with the PlayStation 5 DualSense controller on PC via Bluetooth.

🚀 Features

  • Connect via Bluetooth (HID)
  • Read analog sticks, triggers, digital buttons, touchpad inputs

DEMO

PS5 demo

📦 Getting Started

Prerequisites

  • C++14 (or later) compiler
  • HIDAPI library installed (Linux: sudo apt install libhidapi-dev)

Build Instructions

git clone https://github.com/ayushkumar8340/PS5_Controller_cpp.git
cd PS5_Controller_cpp
mkdir build && cd build
cmake ..
make -j 

Running the Sample

./test_controller 

Output Data packet

typedef struct
{
    MetaData data; // contains data related to the controller
    Axis left_stick; // left stick analog data
    Axis right_stick; // right stick analog data
    Axis dpad; // DPAD values
    
    Sides triggers; // trigger analog values
    Sides bumpers; // bumpers values
    Sides sticks; // L3 & R3 button values
    int buttons[6]; // X, O , traingle and square button inputs

}ControllerData;

About

This repo is used for getting data from a ps5 controller without using ROS. It is a standalone library for PS5 controllers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published