Gamer turns 2012 Honda CR-V with the need for the speed of the underground controller-laptop reads the throttle input with the OBD and Python library, even the steering wheel works

Published:

You have seen complicated simration configurations with many screens. You saw these strange attachments to the steering wheel with 3D print pinned to the Jysome Gamepad. You even saw players trying to lead precisely with the Binary WASD keys in Forza. But what you probably haven’t seen – as long as now – is a real, physical virtual car on the screen.

Meet Mr. Yeester (stylized as Mryeester) who is I just did it exactly. He took a real car, in particular the aged Honda hatchback, and hacked to diagnose the vehicle to read the data from its sensors. Then, using Python libraries and clever scripts, he managed to register the real gas pedal of the car as an input device inside the emulator. Here’s how he did it.

- Advertisement -

Each car made after 1996 (in the US) has an OBD2 port, usually found under the dashboard. It is a universal diagnostic interface designed to assist you identify and repair problems with the car. Mechanics and manufacturers employ it to download all kinds of data from different sensors, from the engine speed to the gas tank level. Basically, if the sensor monitors it, it may appear here. Of course, Mr. Yeester did not employ this port to solve problems.

(Image loan: Mryeester on YouTube)

Thanks to the basic OBD2-to-USB adapter cable, he stuck the car’s ECU (electronic control unit) and began to record the sensor details directly on his laptop. One of these sensors followed the throttle position directly connected to the accelerator. However, it is not as basic as just taking this data and automatic mapping them to any game.

First of all, you need a Python library called Pyserial to read data from car sensors. After a perceptible stream, the next step is to identify a specific PID (parameter identifier) ​​for the throttle. This allows you to employ this particular sensor and write a script that transforms an analog signal from the car pedal pedal into a digital computer. Unfortunately, Mr. Yeester did not share the exact details about how he achieved it.

Python libraries and scripts separating the throttle data from the car pedal sensor

(Image loan: Mryeester on YouTube)

After the script and throttle data are read in real time, the values ​​should be saved in the JSON file. This file is then monitored by a separate automation tool. In the movie, Mr. Yeester used Autohotkey to create a second script that imitates the physical press of the key every time the values ​​in this file change. In his case, he set the script to register the Spacebar input as soon as the “Trigger_Value” parameter exceeded 0.2 in Json.

AutoHotkey Script Changes in the JSON file

(Image loan: Mryeester on YouTube)

Finally, simply open the selected emulator and configure the control scheme to map Spacebar as an throttle input. You can do it in almost every state-of-the-art game that supports non -standard key bonds. Then just run the autohotkey script I, Voilà, the accelerator of your car becomes the gas pedal of your car … needy speed.

Dolphin emulator reading the input of the accelerator

(Image loan: Mryeester on YouTube)

As a bonus, in His long video In the same project, Mr. Yeester even ordered the managers of his car to function as a manager in the game. He used the aged Honda diagnostics tool, which gave him access to some hidden sensors, such as control, which he reproduced in a similar way as the throttle inside the dolphin emulator.

The steering wheel input was detected

(Image loan: Mryeester on YouTube)

The rest of the film turns into a boundary sponsors segment for the dashboard camera, which he used to shoot configuration from the inside of the car. No further technical instructions were given. Despite this, it must be one of the most high-priced – somehow still bare – setting configurations we’ve ever seen. If you want to see a similar drive (without intended playing words) for DIYs, check the unofficial pair 2 controller, made of chopped steam deck.

Follow Tom’s equipment in Google News To get current messages, analysis and reviews in your channels. Click the Fight button.

Related articles