The most reliable way to use a DUALSHOCK 3, DUALSHOCK 4, or DualSense as an input device is an Arduino Uno or Mega paired with a MAX3421E USB Host Shield and the USB Host Shield Library 2.0. Start with a USB data cable and the matching PS3USB, PS4USB, or PS5USB example; add a supported Bluetooth dongle only after wired input works. A normal Uno cannot accept a controller through its programming USB connector by itself.
What this connection does
Your Arduino reads the controller as an input device for a robot, vehicle, servo project, game, menu, lighting system, or other electronics. It does not make the Arduino control a PlayStation console. Depending on the controller and library support, you can read buttons, sticks, triggers, touchpad data and motion sensors, and can send feedback such as rumble or lighting commands.
Choose the hardware route first
| Controller | USB Host Shield Library 2.0 | Wireless example | Notable capabilities |
|---|---|---|---|
| DUALSHOCK 3 (PS3) | Supported | PS3BT; Bluetooth address setup required |
Buttons, sticks, motion sensors, rumble and LEDs |
| DUALSHOCK 4 (PS4) | Supported | PS4BT |
Buttons, sticks, analog triggers, touchpad, IMU, light bar and rumble |
| DualSense (PS5) | Supported | PS5BT |
Buttons, sticks, touchpad, IMU, rumble, LEDs, microphone LED and haptic triggers |
These are documented library capabilities, not a promise that every clone, firmware version, Bluetooth adapter or Arduino board exposes every feature. The library’s current Arduino catalog entry lists version 1.7.0, dated May 21, 2026; check the current documentation when you install it: USB Host Shield Library 2.0 documentation.
Classic Arduino plus MAX3421E
For an Uno or Mega, use a MAX3421E-based USB Host Shield (or a compatible host board), a genuine or compatible controller, and a data-capable USB cable. The shield supplies the USB-host function that the ordinary Arduino USB connector lacks. The MAX3421E is a full- and low-speed USB host controller that communicates with the microcontroller over SPI: MAX3421E specifications.
#1 Best Overall
- Type: PS2 To PS3/PC Controller Converter, connect to your PS3 or PC USB Ports.
- Function: Adapter to use your PS2 controller on PS3 console or PC/Laptop, fully compatible with the console and control.
- Use: Converts PS2 or PS1 vibration controller to play with PS3 games on PS3 system, without requiring any external power or driver to operate. Easy to set up and use.
- Compatible With: All original and third party for PS2 Controller (wired and wireless), supports most of for P3 games and for P2 or P1 vibration controllers, can be directly used with PC computer.
- Application: Support wired For PS1/For PS2 hand lever and wireless For PS1/For PS2 hand lever. Applied on PC/For PS3.
PS4 with an ESP32
A PS4-only project can instead use an ESP32 and Arduino’s PS4Controller library. This uses a different board, pairing process and API; it is not interchangeable with the Uno/host-shield examples. See PS4Controller.
USB or Bluetooth?
- USB: best for first setup. It avoids pairing and dongle compatibility problems.
- Bluetooth: useful for robots and vehicles, but requires a supported USB Bluetooth dongle on the host shield and a controller-specific example.
Do not substitute an HC-05 or HC-06 serial module. Those are not USB Bluetooth HID host adapters for this library.
Parts and compatibility checks
- Arduino Uno, Mega, Leonardo, or another board supported by the selected library and shield.
- MAX3421E USB Host Shield or compatible host board.
- DUALSHOCK 3, DUALSHOCK 4 or DualSense controller.
- Correct data cable (Micro-USB for many DUALSHOCK controllers; USB-C for DualSense).
- Computer and Arduino IDE for installing the library and uploading sketches.
- For wireless use, a compatible USB Bluetooth dongle.
The library catalog describes broad Arduino-architecture compatibility, but that means the software can target those architectures; it does not guarantee identical controller features or clone behavior on every board. Verify the shield schematic, SPI pins, chip-select and interrupt arrangement for your exact board and shield clone.
Build the wired test setup
- Power off the Arduino and seat the MAX3421E shield fully on its headers.
- Check the shield’s schematic for SPI, chip-select and interrupt connections. Do not assume every Uno, Mega, Leonardo or clone routes them identically.
- Connect the controller to the shield’s USB socket with a known data cable.
- Power the Arduino from the computer’s USB port or another suitable regulated source.
- Install the library in the Arduino IDE by opening Library Manager, searching for USB Host Shield Library 2.0, and selecting Install.
- Confirm that the IDE’s File > Examples > USB_Host_Shield_20 menu contains the controller examples.
- Choose the example matching both model and connection:
PS3USB,PS4USBorPS5USB. - Select the correct board and COM port, upload the sketch, then open Serial Monitor at the baud rate specified inside that example.
The project’s installation and example guidance is documented at the USB Host Shield Library 2.0 repository and its API documentation.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
- Controller Adapter Compatibility: The second-generation receiver compatible with 8BitDo bluetooth controllers, Xbox Series X | S, Xbox One Bluetooth controllers, PS5/PS4/PS4 Pro/PS3 controllers and Switch Pro, Switch Joy-Con, Wii U Pro, Wiimote controller. Make sure to update the receiver to the latest firmware. Switch 2 compatibility requires the Adapter to be updated to the latest firmware. (Note: Please ensure it is Bluetooth controller.)
- System compatibility: Switch (3.0.0 and above), Switch 2 (20.1.1 and above), SteamOS Holo 3.4 and above, Windows 10 and above, macOS, Raspberry Pi, Android TV Box, Retrofreak. Friendly reminder: Make sure to update the receiver to the latest firmware. Systems and controllers not mentioned above are not compatible.
- Bluetooth Controller Adapter: Four modes available, X-input, D-input, Mac and Switch mode. Support 6-axis motion on switch mode and vibration on X-input mode.
- Supports ultimate software - customize button mapping, adjust stick & trigger sensitivity, vibration control and create macros with any button combination.
- Please Note: One adapter works for one controller. If you wish to use multiple controllers at a time, you would need to use multiple adapters. Non-bluetooth controller such as 2.4g wireless controller is NOT Compatible. Systems and controllers not mentioned above are not compatible. If you have any questions about our products we're always available to provide assistance.
Confirm controller input before adding motors
A successful run normally reports USB detection or controller initialization, then changes when you press buttons or move sticks. Depending on the selected example, the monitor may show digital button states, analog values, trigger values, motion data or touchpad events. Do not rely on one exact line of output: formats can change between library versions.
- No device message usually means a cable, power, shield, SPI or example-selection problem.
- Button changes confirm that enumeration and report parsing are working.
- Stick values should change smoothly as you move each stick and return near a center value when released.
Use the supplied example as the reference for accessor names and data structures. PS3, PS4 and PS5 APIs are not identical, so copying a function name from another controller example can produce compile errors or incorrect values.
Use the values safely in your own project
Buttons, sticks and triggers
Buttons are digital states or click events. Sticks are analog axes with a center that may not be exactly the midpoint. Triggers can be digital or analog depending on the controller and API. Measure the values produced by your selected example before choosing ranges, signs or center constants.
Dead zones and calibration
Stick drift is prevented by applying a measured center and dead zone. A library-independent pattern is:
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Rank #3
- Controller compatibility: 8Bitdo Bluetooth Retro Receiver compatible with Xbox One, Series and Elite controllers. PS4/PS5 Controller Wii U Pro and Switch Pro Controllers.
- 8BitDo -Controller compatibility: partial 8BitDo Bluetooth controller and arcade stick (not for Xbox Editon). Virtually lag-free.
- Value the Classics: Play your PS1 or PS2 wirelessly.
- System compatibility: PS1, PS2 and Windows 10/11.
- Exclusive Functions: Support controller vibration and firmware update.
if (abs(value - center) < DEAD_ZONE) { value = center; }
For a finished project, store calibration values in code or nonvolatile memory, normalize the usable range after the dead zone, and invert an axis only when your mechanical convention requires it.
Disconnect failsafe
Record the time of the last valid controller packet and stop actuators when communication expires:
if (millis() - lastControllerPacket > CONTROLLER_TIMEOUT) {
stopMotors();
}
Rank #4
- Seamless PS5/PS4 Compatibility: Effortlessly connect your favorite leverless arcade controller to PlayStation 5 and PlayStation 4 consoles. Works with GuileKeys leverless arcade controllers that feature an EXT port. Other controllers need to be tested by you, supports most leverless controllers available on the market.
- Stable Gaming Performance: Eliminate the frustrating “8-minute disconnect” during gameplay. Maintain a stable connection after powering on your device, letting you focus on the game!
- Advanced Web Configurator: Unlock customization through the intuitive web-based configuration tool. Easily update firmware, select PS4/PS5 mode, and adjust authentication settings for optimal performance. P5BOOTS delivers leverless controller zero-latency game control response, precisely capturing every leverless controller input to perfectly execute your gameplay and unleash your full potential!
- Plug & Play: Get gaming in seconds with simple connectivity: update your controller firmware, plug P5BOOTS into the EXT port, and connect to your console. No additional drivers or software required.
- Durable Compact Design: Built with a reinforced USB-C connector and lightweight, portable design. Take it to tournaments, friends' houses, or use it at home without adding bulk. Can be attached to a key chain to prevent loss.
Update lastControllerPacket in the connection/report code used by your selected example. This timeout is a safety pattern, not a universal library command.
Map a stick to a differential-drive robot
- Read the chosen stick axes from the controller example.
- Subtract each calibrated center and apply a dead zone.
- Normalize the remaining values to a range such as -1.0 to 1.0.
- Use one axis for forward/reverse and another for steering.
- Mix the commands: left output equals throttle plus steering; right output equals throttle minus steering.
- Clamp both outputs to the motor driver’s safe PWM range.
- Command a motor driver or H-bridge, never an Arduino GPIO pin directly.
- Stop both sides when the controller disconnects, packets time out or the emergency-stop switch is pressed.
Power DC motors from a separately rated battery or supply through the motor driver, connect grounds as required by the driver, and test with the wheels off the ground at a low PWM limit. The controller connection supplies input only; it does not provide a safe motor-power circuit.
Bluetooth setup
PS3 (DUALSHOCK 3)
PS3 wireless use has an extra association step. Connect the controller by USB first so the library can obtain or set the Bluetooth adapter address, then press the PS button to initiate the wireless connection. The documented workflow calls for a compatible Bluetooth 2.0+EDR dongle and maintains a compatibility list: PS3 information and pairing procedure.
PS4 (DUALSHOCK 4)
For supported Bluetooth hosts, turn off the controller’s player indicator, disconnect USB, hold SHARE while holding PS, and select the controller in the host’s Bluetooth list. On the USB Host Shield Library use PS4BT, not a generic Bluetooth HID sketch. Sony’s controller guidance is at PlayStation accessories support.
Best Value
- 【Wide Compatibility】Enjoy seamless gaming across various platforms with our p4 controller adapter, compatible with official P4 controller/ P5 controller /Switch Pro controllers. Whether you're gaming on Switch, Switch Lite, Windows PC, Android TV Box, Tesla, or Steam, this p4 controller adapter ensures a smooth experience.
- 【Memory Connection】Say goodbye to tedious pairing processes. Our p4 controller adapter plug-and-play feature remembers the last controller connected, making setup a breeze every time. Plus, the included type-C OTG cable simplifies connectivity even further.
- 【No Lag, Just Fun】 Experience gaming without interruptions. Our p4 controller adapter utilizes Bluetooth 5.0 and APTX low latency technology to minimize delay and enhance data transmission speed. Enjoy stable connections and faster response times for a competitive edge during multiplayer sessions.
- 【Portable and User-Friendly】Take your gaming on the go with our compact and travel-friendly p4 controller adapter. No need for driver installations; simply connect your p4 controller, and you're ready to dive into your favorite games hassle-free.
PS5 (DualSense)
DualSense supports USB and Bluetooth on supported hosts. Use PS5BT with the host shield, but test USB first because DualSense reports and feature requirements are more complex. Haptic triggers and other advanced outputs may depend on connection mode, firmware, board resources and library version.
When the ESP32 route makes more sense
Choose an ESP32 with PS4Controller when the project is specifically for a PS4 controller and you want to avoid a separate MAX3421E shield and USB Bluetooth dongle. You must use that library’s installation, pairing instructions and function names; do not combine its code with PS4USB or PS4BT. It is not a general PS3/PS5 replacement.
Troubleshooting by symptom
Nothing appears in Serial Monitor
- Check the selected COM port, board and upload result.
- Use the baud rate specified in the example and reopen the monitor after reset.
- Confirm the example was actually uploaded.
- Try a known data cable rather than a charge-only cable.
- Remove duplicate or obsolete library copies.
The shield is not detected
- Reseat the shield and inspect headers for bent or unsoldered pins.
- Verify SPI, chip-select and interrupt wiring against the shield schematic.
- Confirm it really uses a supported MAX3421E design.
- Check host-side power and test another shield if the clone may be damaged.
The controller charges but does not communicate
- Replace a charge-only cable.
- Use the matching USB example rather than
PS4BTor another Bluetooth sketch. - Disconnect it from another host and retry.
- Test a genuine controller or check whether the third-party device exposes standard reports.
- Check for USB enumeration and adequate power.
Bluetooth does not pair
- For PS3, repeat the adapter-address procedure over USB and verify the dongle’s compatibility.
- For PS4 or PS5, enter pairing mode, remove old pairings where appropriate, and use
PS4BTorPS5BT. - Try another supported dongle and prove the controller works over USB first.
Stick values drift
Measure the resting center, add a dead zone, calibrate both axes and retain the disconnect timeout. Never assume the center is exactly 128 or another fixed midpoint.
An ESP32 TinyUSB build fails
Adafruit documents a compatibility issue affecting its MAX3421E examples with version 3.2.0 of the ESP32 Arduino board-support package and gives 3.1.3 as an example downgrade target. Treat that as a version-specific workaround and check the current guide before changing your installed package: Adafruit USB Host BFF Arduino guide.
Free tools Windows power users keep installed
One-click scans. No signup required.
Advanced controller features
Once basic buttons and sticks work, the library examples can expose touchpad coordinates, accelerometer and gyroscope data, rumble, light bars, player LEDs, microphone LEDs and, for DualSense, haptic-trigger effects. These capabilities are controller-specific and may require USB, particular firmware or sufficient board resources. For most Arduino robots, reliable stick input and a disconnect stop are more useful than implementing every feedback feature.
Choosing host hardware
| Route | Best fit | Advantages | Trade-offs |
|---|---|---|---|
| Uno/Mega + MAX3421E + USB | Beginner bench testing and repeatable builds | Simple cable connection and broad documented PS3/PS4/PS5 support | Needs shield and cable; limited processing headroom |
| Uno/Mega + MAX3421E + Bluetooth dongle | Wireless robots | No controller cable during operation | Pairing and dongle compatibility add failure points |
| ESP32 + PS4Controller | PS4-specific wireless projects | Integrated wireless hardware can eliminate the shield and dongle | Different board, API and PS4-focused support |
| Feather, QT Py or XIAO plus MAX3421E host hardware | Compact builds using a supported Arduino/TinyUSB stack | Small form factor | Board-specific software and wiring decisions |
For example, Adafruit lists a MAX3421E USB Host FeatherWing at $14.95 observed August 18, 2026; it is for compatible Feather-format boards, not a direct Uno shield: USB Host FeatherWing. Its USB Host BFF for QT Py or XIAO was also listed at $14.95 observed August 18, 2026, with a separately listed Micro-B OTG-to-USB-A cable accessory at $2.50: USB Host BFF. Availability and prices can change.
Before buying, verify board format, voltage levels, SPI and interrupt routing, host power capacity, required headers and cables, and support for your exact controller. A genuine PlayStation controller is the safer starting point than an unverified clone, whose USB identifiers, HID reports, Bluetooth behavior or feature set may differ.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minute




