Using ps4 controller to control arduino car

Thread Starter

Killerbee65

Joined May 15, 2017
256
You cannot run the dongle and the serial monitor on one serial port.

So, let’s say you run the dongle on the USB Host Shield. Where are you going to connect the serial monitor?

Im guessing that you’re planning on using the Arduino USB programming for the latter. And the USB Dongle will connect to the USB Host Shield.

I’d read the documentation of the USB Host Shield in detail. Somewhere, there must be a description of a function to initialize the USB Host Shield. That function likely assigns a serial port to the USB connection.

You need to find that documentation.
I've tried but I'll give it another look, the library I have downloaded has a bunch of USB libraries within it so it'll take awhile
 

Thread Starter

Killerbee65

Joined May 15, 2017
256
You cannot run the dongle and the serial monitor on one serial port.

So, let’s say you run the dongle on the USB Host Shield. Where are you going to connect the serial monitor?

Im guessing that you’re planning on using the Arduino USB programming for the latter. And the USB Dongle will connect to the USB Host Shield.

I’d read the documentation of the USB Host Shield in detail. Somewhere, there must be a description of a function to initialize the USB Host Shield. That function likely assigns a serial port to the USB connection.

You need to find that documentation.

So after some more research I learned that the guy in the video (in first post) is using a usb to ttl serial converter, now I have a very rough idea of what the device actually does but I am guessing it is what allows both serial ports to send and receive information without conflict.
 

djsfantasi

Joined Apr 11, 2010
9,237
Sorry, I couldn’t remember the term, but that’s what I meant by a hardware cable.

Glad you found that out.

And yes, that device lets you use other pins for serial communication hence another port.
 

Thread Starter

Killerbee65

Joined May 15, 2017
256
Sorry, I couldn’t remember the term, but that’s what I meant by a hardware cable.

Glad you found that out.

And yes, that device lets you use other pins for serial communication hence another port.
Ok, I see, now would this work with the MEGA or UNO that I have? also I heard you could use a uno as a converter aswell with specific wiring.
 

djsfantasi

Joined Apr 11, 2010
9,237
AFAIK, it will work with any Arduino. If the Arduino model you have only has one serial port in the hardware, you’re still in luck.

There is a library that will add additional serial ports to any Arduino. It’s called SoftwareSerial. In the setup() routine, make a call to a function to set up the comm port on the pins you want. Then you use the regular serial commands, modified to identify the serial port, as usual. Like:
Serial1.println(“Test”);
 

Thread Starter

Killerbee65

Joined May 15, 2017
256
AFAIK, it will work with any Arduino. If the Arduino model you have only has one serial port in the hardware, you’re still in luck.

There is a library that will add additional serial ports to any Arduino. It’s called SoftwareSerial. In the setup() routine, make a call to a function to set up the comm port on the pins you want. Then you use the regular serial commands, modified to identify the serial port, as usual. Like:
Serial1.println(“Test”);
I've actually read up on that I just don't know how to utilize it, I like to work from end to beginning, so seeing a functioning code or setup might help me understand.
 

Thread Starter

Killerbee65

Joined May 15, 2017
256
Update: I bent the txo and rxo pints on the shield and connect them to tx1 and rx1 respectivelt but when the code uploaded and the serial monitor opened I got this:


PS4 Bluetoot
PS4 Bluetooth Library Started
Unknown Device Connected - VID: 045E PID: 028E
BTD Init Failed, error code: D1

Unknown Device Connected - VID: 045E PID: 028E
BTD Init Failed, error code: D1

Unknown Device Connected - VID: 057E PID: 2009
BTD Init Failed, error code: D1

Unknown Device Connected - VID: 045E PID: 028E
BTD Init Failed, error code: D1

Unknown Device Connected - VID: 057E PID: 2009
BTD Init Failed, error code: D1

Unknown Device Connected - VID: 045E PID: 028E
BTD Init Failed, error code: D1

Unknown Device Connected - VID: 057E PID: 2009
BTD Init Failed, error code: D1

Unknown Device Connected - VID: 045E PID: 028E
BTD Init Failed, error code: D1

Out of address space
 

DarthVolta

Joined Jan 27, 2015
521
I wanted to use my arduino the other day, but I can't find it, I fear it was stolen !! And I have a suspect, but what am I going to do, apart from gaining access to his home, to search for it.

And I'm not doing that !
 
Top