I recently bought a USB Host Controller Board with pre-loaded PS4 Dualshock controller software, together with the recommended Bluetooth dongle.
The intention was to use it in conjunction with an I2C PWM servo controller board to control a bunch of micro servos - replacing the analogue thumb joysticks I’m currently using for the same purpose. The boards have different default I2C addresses so I thought it would be a simple matter of chaining them up in parallel and implementing the relevent libraries.
Unfortunately I’m getting absolutely no joy communicating with the board and have struggled to find a decent library or tutorial to help out. Most of the sample libraries I’ve seen seem to relate to SPI host controller boards rather than I2C.
I have the board connected as follows:
- 5V to 5V power supply
- Ground to power supply GND (common with Arduino GND)
- SDA to Arduino pin A4 (SDA)
- SCL to Arduino pin A5 (SCL)
I’m assuming that’s all that’s needed to get this up and running with I2C?
The board powers up OK and I can successfully pair it with a PS4 Dualshock controller using the instructions provided by the supplier. But that’s about as far as I can get. The attached test harness just hangs on the get_ps4() function and I never get a response.
The I2C PWM servo board (disconnected for this test) works fine so I don’t think there’s a problem with the Arduino.
I’m sure I’m doing something incredibly dumb here but would be very grateful for any tips or examples of working wiring and code.
ps4_test.ino (1.13 KB)