Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RaceSimRemote: Virtual Racing Wheel for Android

RaceSimRemote transforms your Android device into a virtual remote racing wheel for simulation games. By utilizing your device's high-precision motion sensors, it provides an immersive steering experience, complemented by on-screen controls for essential racing functions.

How it Works

The app acts as a bridge between your physical movements and the racing simulator.

  • Steering: Tilt your device like a steering wheel. The app uses the TYPE_GAME_ROTATION_VECTOR sensor to track your device's pitch in landscape mode, translating it into precise steering input.
  • Pedals: Two vertical sliders (SeekBars) on the screen act as your throttle and brake pedals. They are designed to auto-reset to zero when released, mimicking the behavior of physical pedals.
  • Gears: Dedicated, color-coded buttons allow for quick gear changes (Gear Up/Down).
  • Communication: All inputs are aggregated and broadcasted via low-latency UDP packets to your PC or simulation host.

User Interface Layout

The interface is optimized for landscape use:

Position Element Function
Left Side Red Button Gear Down
Vertical Slider Throttle
Center Digital Display Real-time steering percentage and device pitch
Right Side Blue Button Gear Up
Vertical Slider Brake

Technical Implementation

Project Structure

  • MainActivity.kt: Handles UI interactions, sensor registration (Game Rotation Vector), and coordinate mapping.
  • UdpSender.kt: Encapsulates the network logic, using Kotlin Coroutines to ensure smooth UI performance while streaming data.
  • activity_main.xml: A custom RelativeLayout designed for ergonomic "wheel-style" grip.

Network Protocol (UDP)

Data is streamed to port 3000 (default target: 192.168.1.6) using a 16-byte Little Endian packet structure:

Offset Type Description Range / Mapping
0 Int32 Steering -32767 (Left) to 32767 (Right)
4 Int32 Throttle 32767 (Idle) to -32767 (Full)
8 Int32 Brake 32767 (Idle) to -32767 (Full)
12 Int32 Buttons 1: Gear Up, 2: Gear Down, 0: None

Getting Started

  1. Open the project in Android Studio.
  2. In MainActivity.kt, update the UdpSender initialization with your computer's IP address.
  3. Deploy the app to your Android device.
  4. Ensure both the device and the PC are on the same Wi-Fi network.
  5. On your PC, use a compatible receiver or custom script to map these UDP inputs to your game's controls.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages