arduino (19): Use ESP32 to connect PS3 bluetooth controller, you need to connect successfully on windows, and then modify the mac address, then you can connect successfully, but it is currently under test and needs to be paired successfully on windows.

Preface


All related arduino categories:
https://blog.csdn.net/freewebsys/category_8799254.html

The original link for this article is:
https://blog.csdn.net/freewebsys/article/details/105912412

Reprinting is not allowed without the permission of the blogger.
The blogger's address is: http://blog.csdn.net/freewebsys

1. About Arduino


Before tossing the DIY car, I still used the PS2 handle, which has a large adapter and a plug.
The volume is very large, and it is not beautiful, and it is also limited by the distance. After all, the PS2 is a bit behind.
Now to toss the Bluetooth PS3 handle.

ESP32 is with Bluetooth chip. There are ready-made open source projects already supported.

2. Use Arduino


https://github.com/felis/USB_Host_Shield_2.0

USB_Host_Shield_2.0 There are many people concerned about this project, but a device needs to be purchased.
It seems that the equipment bought in China is not reliable. Relatively niche.

Refer to another project:

【Interfacing PS3 with ESP32】

You can find such an article on the whole network:
https://www.element14.com/community/people/skywalker1211/blog/2019/10/22/interfacing-ps3-with-esp32

I did what I said: I
Insert picture description here
downloaded the Sixaxis Pair Tool, but I still didn't connect.

Here is just using Arduino for testing.

Maybe it is because you bought a pirated handle? ?

https://item.taobao.com/item.htm?id=42468660604

Insert picture description here
Cheap to cheap, PS3 handle Bluetooth is cheap, PS4 is much more expensive.

[Watch the video directly and follow the operation]

Video address: http://www.tudou.com/programs/view/QEJTcgi64SY/

It feels that my controller is not connected successfully on the computer, so the arduino cannot be connected.

3. Connect on arduino


https://github.com/jvpernis/esp32-ps3

#include <Ps3Controller.h>

void setup()
{
    
    
    Ps3.begin("01:02:03:04:05:06");
}

But not.

4,Linux


启动软件进行测试  

apt install -y jstest-gtk  jstest
 jstest /dev/input/js0

jstest-gtk 

Insert picture description here

This is to test the mouse using GUI on Linux. Explain that all the functions above are good.

5. Summary


The arduino ESP32 is equipped with Bluetooth, so I thought it would be fine to get a PS3 mouse.
But still encountered a pit. My own operating system uses Linux, and there is no software to test it directly.
You also need to pair successfully on Windows.

1. Use USB to identify on windows, and then pair successfully on windows bluetooth.
2. Modify the PS3 Bluetooth master address 01:02:03:04:05:06.
3. On the arduino, Ps3.begin("01:02:03:04:05:06"); is fine.

Still tossing in windows. It is estimated that the pairing will do.

The original link for this article is:
https://blog.csdn.net/freewebsys/article/details/105912412

The blogger address is: https://blog.csdn.net/freewebsys

Guess you like

Origin blog.csdn.net/freewebsys/article/details/105912412