📜 ⬆️ ⬇️

Steering wheel for PC based on Wii Remote



Most of us are aware of a gaming console like the Wii, the hallmark of which is the Wii Remote wireless controller. Today I will tell you about my experience in turning this controller into a convenient, functional, and at the same time very cheap steering wheel for a computer.

The capabilities of the controller itself are impressive:

image Three Axis Accelerometer
image Infrared camera
image Bluetooth connection
image Vibrating motor and speaker
image 4 LED indicators
image Connection of additional controllers
image 12 buttons
')
For us, accelerometer and Bluetooth are important. And the procedure itself will look something like this:
  1. Find a Wiimote controller (alternatively named Wii Remote).
  2. Connect it to the computer.
  3. To adjust the conversion of data received from the accelerometer controller into a format understandable to games.

Where to get a Wiimote controller


Those who have a prefix Wii, can immediately move on to the next item. I did not have one, and I decided to buy a controller separately.
In Russia it costs about 2,000 rubles, which, in my opinion, is unreasonably expensive. So, without thinking twice, I went to an ebay auction. And no mistake! A year ago, the new original Wii remote + Nunchuk with free shipping cost me only $ 18.50. With a cursory examination of today's search results , prices have become even lower.

Connect to computer


At first glance, no difficulties should arise here: the main thing is to have a built-in or external Bluetooth receiver. On the Internet you can easily find several instructions for connecting the Wiimote to your computer.
However, either because of the old Windows Vista, or because of an even older Bluetooth adapter, I could not get the controller to work properly using the standard Microsoft Bluetooth stack. But where Microsoft stumbled, IVT succeeded with its BlueSoleil product (unfortunately, paid). Without much effort, I managed to connect the controller and make it work stably. Detailed instructions can be found, for example, here .

Brief instruction:
  1. Install BlueSoleil (or with good luck using standard Windows tools).
  2. We activate the Bluetooth-adapter.
  3. We press the buttons 1 and 2 on the controller and start the search for devices.
  4. The controller is recognized as Nintendo RVL-CNT-01.

Turn the Wiimote into the steering wheel


Several programs have been written for the Wiimote to work with a PC, for example GlovePIE is a universal program for emulating input devices that allows, including Connect the computer and the Wii Remote using the internal scripting language.
After searching, you can find several such scripts, but not everything is so smooth here;)
I managed to get the controller to work with a virtual joystick, but the work with the accelerometer was very unstable: you turn the controller a little on a certain axis (or too fast / at a very large angle / etc), and it hangs, ceasing to send data.
I did not put up with this disgrace, and continued the search. After a while I came across a wonderful .NET library: WiimoteLib . It allows you to access almost any functions of the controller, and receive data from its sensors. Included is an example program that displays all the information coming from the controller.


Now that we have data from the accelerometer, we need to somehow bring them to an understandable format for games. Most racing games support the iron steering implementation. And we give them a virtual one. To do this, we use the universal joystick emulation driver - PPJoy .

Official download link: PPJoySetup-0.8.4.5-early-release.exe

Add a new virtual joystick to the system:

image Install PPJoy
image In the control panel we find and open “Parallel Port Joyks”.
image Click on the Add button.
image Parallel Port parameter is changed to Virtual joysticks
image Click on the Add button.
image Select the created joystick in the list and click on “Mapping ...”
image Next>
image We fill it and the subsequent windows as on screenshots, and we finish setup.



I wrote a small C # program that, in fact, being a bridge between the Wiimote and PPJoy, presses the virtual buttons and turns the virtual steering wheel of the joystick. At startup, you can set the sensitivity.


You can download it along with the source code at this link: WiiController.zip

Tests in the real world


All tests were conducted on a racing simulator Colin McRae: DiRT 2.
I apologize in advance for the quality of photos and videos: everything was filmed on a soap dish five years ago.



Approximate view of the game settings:


And here is what a real game with a controller looks like:



Impressions


Purely positive! Passed the whole game using only the Wiimote. Everything works so stable and fast that after a few minutes you forget that you have a device in your hands that was not meant for that at all. Of the benefits: a huge steering wheel does not cover the half of the screen, and does not interfere with the movement of hands, all controls are displayed on the controller buttons.

ps In general, you can do a lot of cool things with the Wii Remote, here are some of them:
  1. http://johnnylee.net/projects/wii/
    Finger tracking, multitouch board, head tracking (to create the illusion of three-dimensionality, look beyond the edge of the monitor). In fact, I bought the Wiimote under the impression of these projects.
  2. http://habrahabr.ru/blogs/DIY/91149/
    Virtual window to the Winscape world with head position tracking using the Wiimote
  3. http://habrahabr.ru/blogs/subconsciousness/2877/
    5 of the most creative ways to use the Wiimote.

Source: https://habr.com/ru/post/114237/


All Articles