In order to handle the functions of Grogu I have thought that the best option (although not the most discreet) is to use a PS4 controller. This remote works through Bluethooth and has many control options for the real action of the doll.
The management options are on the project page itself, here I am going to focus on the technical part and link with the controller.
- The controller for Grogu
- A USB 2.0 Micro-B cable
- Arduino software (version 1.8.12 or higher)
- Source code and its libraries
LINKING A REMOTE WITH THE CONTROLLER
To link the command to the controller we must open the source code, in the main tab, and look for line 43 and uncomment it, also comment on line 46… As shown in the image.
We connect the controller with a USB cable to the pc and upload the code with these modifications. This prepares the code to be able to pair the controller to the Bluethooth pen.
We open the terminal and wait for the MAC of the pen bluethooth to be read
The controller is then set to pairing mode by pressing and holding the “PlayStation (PS)” button and the “Share” button at the same time. Hold down these two buttons until the light on the PS4 controller starts to flash rapidly. Now the Arduino should automatically detect the PS4 controller.
Once the command has been linked, it will be shown in solid red and the arduino terminal will show the link data.
In this step, we correct the arduino code again and leave lines 43 and 46 as they were. We recompile and upload it back to the arduino.
With this, the command is linked to the controller.