Skip to content

Automatic calibration of Mot-Ion and other virtual pinball tilt sensors

License

Notifications You must be signed in to change notification settings

JohnStrunk/tilt-wizard

Repository files navigation

tilt-wizard

Build Status

tilt-wizard is a simple Windows cli program to automatically calibrate DirectInput-based motion sensors used for Virtual Pinball.

Background

When building a virtual pinball cabinet, a popular option to add is a motion sensor so that it is possible to "nudge" the table while playing and have this real-life jostling of the table affect the movement of the virtual pinball.

When I built my table, I chose to use the Mot-Ion controller. It appears to the computer as a gamepad with the x and y axes detecting motion of the cabinet. Unfortunately, these units have a good bit of noise to them, are difficult to calibrate, and their center point tends to change with temperature.

This project is my attempt to create a simple executable that automatically calibrates the center, limits, and deadzone on-the-fly.

Using tilt-wizard

Download the latest version from the Releases page.

Run tilt-wizard -l with no arguments to list available DirectInput devices:

C:\tilt-wizard>tilt-wizard.exe -l

This should discover any devices attached to your computer. To have tilt-wizard automatically tune the device, pass in the GUID of the desired device via the -d option:

C:\tilt-wizard>tilt-wizard.exe -d {34BE2320-42C7-11E6-8001-444553540000}

The application will then run, sampling the X & Y axes and updating the center point.

  • current: The most recent sample
  • avg: The currently calculated average (and center point)
  • DZ%: The recommended deadzone percentage for this axis. It is calculated based on the standard deviation of the incoming data.

Example:

Example output for tilt-wizard

To integrate tilt-wizard with your pinball cabinet, see the installation document.

Building from source

You will need MinGW-w64 to build the source. While you can download and install it directly, I recommend using Chocolatey. Chocolatey is easy to install and once you get it running, you can install MinGW-w64 via:

C:\>choco install mingw
...

Once you have the prerequisites installed, make sure you update your PATH. In my case, that was:

set PATH=%PATH%;C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw64\bin

You should now be able to build via:

C:\tilt-wizard>mingw32-make
... build output ...

Then run it via:

C:\tilt-wizard>tilt-wizard.exe

About

Automatic calibration of Mot-Ion and other virtual pinball tilt sensors

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published