Click here to Skip to main content
13,351,731 members (43,013 online)
Click here to Skip to main content
Add your own
alternative version


24 bookmarked
Posted 14 Jan 2013

UltraDynamo (Part 1) - It all starts here!

, 14 Jan 2013
Rate this:
Please Sign up or sign in to vote.
In this section, we look at the basics to get going.

Note 1: The source code is marked V1.1+ as it contains the code used in the V1.1 release as well as some of the stuff still in development that is hidden in the background.
Note 2: The Build Event code for code signing has been removed as this contained paths and passwords relevant to my build only. There is a description later in the article of the build event code.

Table Of Contents


This article series will be the new home of UltraDynamo. UltraDynamo was my entry to the Intel AppUp Ultrabook™ competition (October 2012) hosted by The CodeProject. The original article for the competition can be found at

In this article, I will hopefully take you through the various aspects of developing the application, as well as looking at some of the finer detail within the code. As I continue to develop the application (when time allows!) I will hopefully roll the changes/updates and any new interesting aspects back into this article.


Originally this started life as one long article, but decided to split this up into functional aspects, as it became quite unmanageable. As the application develops over time, It will be easier to add in updates to the relevant part and make life slightly easier.

What is UltraDynamo

UltraDynamo is a windows desktop application that makes use of the various sensors available in the next generation of Ultrabooks. These sensors include;

  • Accelerometer
  • Gyrometer
  • Inclinometer
  • Compass
  • GPS
  • Ambient Light

The intent of the application is to provide a Rolling Road environment for motor sport enthusiasts that can use the sensors to determine the performance of their vehicles. Technically, it should be possible to perform functions such as;

  • Reaction timers
  • Acceleration / Braking timers e.g. 0 to 60, 0 to 60 to 0
  • Distance timers e.g. quarter mile
  • Power Calculations e.g. Brake Horsepower
  • Mapping data to GPS locations and overlay onto maps (e.g. Google Maps)

The data can then be presented to the user in various formats, e.g. numerical, charts, pictures.

Is the Application Finished?

Far from it, this is very much a work in progress as time allows. As new features are added or existing features improved, I hope to keep this article series up to date and share the source and compiled applications with the community here on CodeProject.

Can I contribute, make suggestions, report problems?

Of course you can, use the messaging features of Codeproject to either leave a forum message at the bottom of the article sections or drop me a private message via the email link.

Don't expect miracles though, time is limited and I have plenty other things to be doing as well.

My Development Environment

In order to develop this application I am using the following;

  • Primary development machine: Windows 8 Pro desktop computer, no sensors, Visual Studio 2012 Pro
  • Secondary development machine: Windows 8 Pro laptop computer, no sensors, Visual Studio 2012 Pro
  • Test machine: Windows 8 Pro, Ultrabook with Sensor platform, Visual Studio 2012 Pro
  • Source Code Repository: Windows 2008 R2 Server running VisualSVN Server

I received the Ultrabook as part of the competition, so did not have that for initial development or testing of the sensors. This made for an interesting work around which I will cover later on. In order to keep all the machines in check, I use VisualSVN Server as a source code repository hosted on my Windows 2008 R2 virtual machine at 1&1. In order to allow the Visual Studio 2012 IDEs to integrate and communicate with the source code repository, I use ankhsvn plugin for Visual Studio. It is a simple case of checking in any code changes on one machine following any edits, then updating source to latest version on the others. This works very well as a method of managing the source from a multi-machine single developer point of view.

The application UltraDynamo is a Windows8 Desktop application using Windows Forms written in C#.

For the code signing tools and access to the sensor diagnostic tools etc. you need to install the Windows 8 Software Development Kit (SDK). It is available from[^]

Preparing Visual Studio 2012 

The first thing that must be done when developing for Windows 8 and the Windows Runtime (WinRT) was to make a couple of modifications to the project files creates by Visual Studio. 

The very first thing to do is create a new Windows Forms C# application and target the relevant .Net framework, in my case .Net 4.5

After this you must unload the project. To do this, from the solution explorer, right click the project and select unload;

Next, In Visual Studio, right click the project and select  Edit insertyourprojectname.csproj


 Insert the new PropertyGroup just under the main Project element as shown below;

 Save the changes, and close the editor window. Next in Solution explorer reload the project again;

The next thing we need to do, is add the suitable references to the Windows Runtime and the sensor libraries. First, In solution explorer, under the project, right click on References and select Add Reference


 Finally, we need to add the Sensor library (Windows.Devices.Sensors.dll) and the Introp library (System.Runtime.InteropServices.WindowsRuntime.dll). Repeat the Add Reference process again, but this time select Browse and navigate to where the libraries are stored. See the image below for paths;

External Controls 

In the dashboard image above you will see form makes use of dials. I didn't have a lot of time to go and start writing my own controls or finding different controls to try. Fortunately I found a dial control here on CodeProject. Ambalavanar Thirugnanam had already written and made available for use a control called Aqua Gauge, this was very easy to implement and was a great control to use as an initial implementation.

The source code for the control was dropped into my application and as required the header was left in place;

/// Aqua Gauge Control - A Windows User Control.
/// Author  : Ambalavanar Thirugnanam
/// Date    : 24th August 2007
/// email   : [email removed from article to protect from address sniffers]
/// This is control is for free. You can use for any commercial or non-commercial purposes.
/// [Please do no remove this header when using this control in your application.]

Release History

V1.1 - This used the improved sensor manager code, added the double buffering to the drawing aspects and re-instated the simulator code. The first test code of the reaction timers is present in the source, but not available to the user.

V1.0 - This was the first rushed out the door code. It had flickering displays, the simulator code was disabled and hidden from view.

On To The Next Part

In the next section we will take a look at the sensors.

Part 2 - It is all about the sensors


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Scotland Scotland
I have been working in the Oil & Gas Industry for over 25 years now.

Core Discipline is Instrumentation and Control Systems.

Completed Bsc Honours Degree (B29 in Computing) with the Open University in 2012.

Currently, Offshore Installation Manager in the Al Shaheen oil field, which is located off the coast of Qatar.

Prior to this, 25 years of North Sea Oil & Gas experience.

You may also be interested in...


Comments and Discussions

QuestionHope a MFC source is available Pin
lanmanck5-Sep-13 20:08
memberlanmanck5-Sep-13 20:08 
GeneralHistorical Information Pin
Vivic19-Jun-13 6:28
memberVivic19-Jun-13 6:28 
GeneralRe: Historical Information Pin
DaveAuld19-Jun-13 6:59
protectorDaveAuld19-Jun-13 6:59 
GeneralMy vote of 5 Pin
Ahmed Ibrahim Assaf27-Jan-13 23:15
memberAhmed Ibrahim Assaf27-Jan-13 23:15 
QuestionHowz is it going at Intel perceptual Challenge? Pin
Abhishek Nandy14-Jan-13 19:01
memberAbhishek Nandy14-Jan-13 19:01 
AnswerRe: Howz is it going at Intel perceptual Challenge? Pin
DaveAuld14-Jan-13 21:46
mentorDaveAuld14-Jan-13 21:46 
Thanks for your vote and feedback in the other post below.

Anyway, I am not aware of an Intel Perceptual Challenge, and certainly not entered any other competitions. Do you have the link to the competition page? It would be interesting to read about it.

Find Me On: Web|Facebook|Twitter|LinkedIn

Folding Stats: Team CodeProject

GeneralRe: Howz is it going at Intel perceptual Challenge? Pin
Abhishek Nandy27-Feb-13 18:58
memberAbhishek Nandy27-Feb-13 18:58 
GeneralMy vote of 5 Pin
Abhishek Nandy14-Jan-13 18:56
memberAbhishek Nandy14-Jan-13 18:56 
GeneralMy vote of 5 Pin
Ranjan.D14-Jan-13 10:46
memberRanjan.D14-Jan-13 10:46 
GeneralMy vote of 5 Pin
Marc Clifton14-Jan-13 8:34
protectorMarc Clifton14-Jan-13 8:34 
GeneralRe: My vote of 5 Pin
DaveAuld14-Jan-13 9:02
mentorDaveAuld14-Jan-13 9:02 
GeneralRe: My vote of 5 Pin
Marc Clifton14-Jan-13 11:02
protectorMarc Clifton14-Jan-13 11:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.180111.1 | Last Updated 14 Jan 2013
Article Copyright 2013 by DaveAuld
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid