GithubHelp home page GithubHelp logo

diffusiondata / blog-steering-wheel Goto Github PK

View Code? Open in Web Editor NEW
1.0 29.0 0.0 448 KB

Repository for Quintin's blog on F1 steering wheel integration with Diffusion

License: Apache License 2.0

C# 53.43% Objective-C 46.57%

blog-steering-wheel's Introduction

Introduction

This project aims to demonstrate the realtime data transmission capabilities of Diffusion™.

It does this by using a steering wheel device, as used for gaming, as a source of constantly changing data. As the driver interacts with the wheel, their actions are reflected in realtime by the display clients.

For more information see the Push Technology blog post: Creating a Dynamic Diffusion Demo using Real Time Gaming Hardware (18 September 2014)

Publishing client

Connects to the Diffusion server using the Unified API. It streams data about the car and the driver's use of the steering wheel to topics on the server. To do this it uses the following features:

  • TopicControl: To create the topics to which we're going to publish.
  • Topics: To check whether the topics have already been created. It does this using the simplistic approach of calling GetTopicDetails just for our root topic "F1Publisher".
  • TopicUpdateControl: To publish updates to the topics.

Implemented in C# (.NET) for Microsoft Windows:

  • Developed and tested using Visual Studio Express 2013 for Windows Desktop under Windows 7.
  • Requires the Diffusion .NET Unified Client Library (SDK) version 5.1.0 or higher.
  • Requires the SlimDX framework (tested with the January 2012 release).
  • Requires a Joystick device (ideally Steering Wheel) supporting DirectInput (DirectX).
  • Runs as a console application.

Windows was chosen as the implementation platform for the publishing client because of its high level of support for gaming devices. DirectInput wrapped with SlimDX provides easy, immediate access to Joystick events with minimal code.

Tested in development using a Thrustmaster Ferrari Challenge Wheel. In order to attain correct button mappings you will probably need to install the manufacturer's own device driver rather than relying on the default Windows driver.

Display Client

Connects to the Diffusion server using the Classic API.

Implemented in Objective-C (Cocoa Touch) for Apple iOS mobile devices (iPhone, iPad and iPod):

  • Developed and tested using Xcode 5.1.1 (iOS SDK 7.1).
  • Requires the Diffusion iOS Library (SDK).
  • iOS Deployment Target: 7.0.

Running the Demo

Prerequisites

You'll need:

  • An OS X machine with Apple's Xcode installed.
  • Optionally, an iOS device provisioned for development testing. Otherwise, the iOS simulator provided with Xcode.
  • A Windows machine with Microsoft's Visual Studio installed.
  • A DirectX-compatible steering wheel or joystick gaming device plugged in to the Windows machine.
  • A machine running Diffusion 5.1.
  • A network setup which allows both your Windows machine and your iOS device (physical or simulated via OS X) to communicate with the Diffusion server.

1. Start Diffusion

Get your Diffusion server up and running. The default configuration is fine as this enables support for clients using both the Classic and Unified APIs.

2. Start the publishing client

On your Windows machine:

  1. Clone our demo repository.
  2. Open the solution in Visual Studio: Windows/F1.sln
  3. Unless you're running the Diffusion server on the same machine, you'll need to navigate to Settings (available under Properties for the F1Publisher project) and modify the value for DiffusionServerURL. By default this is set to dpt://localhost:8081
  4. Start (Build and Run).

3. Start the Display Client(s)

On your OS X machine:

  1. Clone our demo repository.
  2. Open the project in Xcode: iOS/F1Display.xcodeproj
  3. Configure the location of your Diffusion server. This is defined by the macro DIFFUSION_SERVER_URL in CONFIG.h
  4. Run

blog-steering-wheel's People

Contributors

katshann avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.