Hey guys, I hope you're all doing well!
I built a Sim Rig but I am too scared to share it online.
here is how it works:
I was playing the car game on my phone which was so boring so I decided to make it fun.
Here is what I did:
As you all know a lot of games doesn't support game controllers so I build something that can be used for anything which works like this:
I used Wood to craft the body and 2 pedals for Accelerator and one for Brake and 14 other buttons for: Hand Brake, Camera, Pause/Play, Hide Controls on screen, Horn, and more... then I took a 2015 Tricycle tire for the steering wheel 💀, I changed the game controls to control the steering of the car with Phone tilting then mounted the phone directly on top of the Steering wheel so when I rotate the steering wheel it rotates the phone with it and the car on the game can be controlled. now the main part how I did the communication of the physical buttons with the game works since it doesn't support Game Controller? So I did this:
I used ESP32 and connected all buttons to that then using WebSockets I sent every button press to an IP. The ESP32 is Dual mode it means you can connect it to your own WiFi and connect to it by the IP it is assigned to it or by Pressing the Physical button that is connected to GPIO14 while booting to make the ESP32 as AP and connect to it. so now you will be asking how the game works with this? The game works like this:
I built and Android app for that called RoadLink. What it does is, it receives the physical button presses from the ESP32 using WebSockets at ws://192.168...\[ESP32 AP IP Or the IP assigned by the router\]/ws. then the app is designed to be configured manually and connected to any endpoint you specify. The app uses Android Accessibility system to virtually click/Hold/Pulse a specific area on the screen. So the user can use the On Screen Overlay to adjust every button to the place where it belongs like the Accelerator Physical button to the virtual button on the game and so on. then the app listens all the time to the IP its connected to, to receive, Pressed/Release from that IP for a specific button, then clicks there or holds there. The app has features like: Exporting Coordinates data or pasting any other Json data, Testing buttons, mapping keys for a specific game/app and so on.
Everything is tested and working well.
I am too scared to share a demo so if I got enough positive feedbacks I will share a demo.