Szymon Kobalczyk's Blog

A Developer's Notebook

  Home  |   Contact  |   Syndication    |   Login
  99 Posts | 6 Stories | 287 Comments | 369 Trackbacks

News

Spotkasz mnie na CodeCamp'09 View Szymon Kobalczyk's profile on LinkedIn

Twitter












Article Categories

Archives

Post Categories

Blogs I Read

Tools I Use

Monday, January 04, 2010 #

Just after finishing my multicolor RGB controller shield for Arduino, I came across Fritzing, a program that lets you convert your breadboard prototypes into a physical PCB. Since I got one design working at hand, I decided to give it a try. The process is very straightforward.

First you simply put all the components in the breadboard view. The parts library contains most common parts, and you use wires to connect them – exactly the same as you would do on your physical prototype:

Fritzing - Breadboard viewNext you can switch to schematic view where you can check if all the connections are correct:

Fritzing - schematic viewFinally you go to the PCB view and layout your parts on the board. Then you need to route all traces, and while Fritzing does quite a good job with auto-routing, it is worth to spend some time and review the design. In my case I was able to eliminate all the jumper wires – needed otherwise because currently Fritzing supports only single-sided PCBs.

Fritzing - PCB view In my case I designed the board to fit as an Arduino shield. As you can see it consists of a 12V voltage regulator circuit for external power source and ULN2003 converter to drive two RGB outputs.

After you are happy with you can save it in multiple output formats. For me the the etchable PDF format was especially handy because I could print it as a paper prototype and check if all the physical parts will fit properly.

Fritzing also offers a website where you can upload your projects along with any additional documentation, images, and source code. You can find my project page here: http://fritzing.org/projects/multicolor-rgb-led-controller-shield-for-arduino/

On top of that, starting with January 2010 they start a Fritzing Fab Service, and produce the real, physical PCBs. In preparation for this, they selected 24 projects and made them manufactured. I was very happy that my design was selected as one of these projects.

I got my board short after Christmas, and it looks very professional (at least for me :-)):

And here is the final product:

P1150499

As a geek I always wanted to hack the hardware like this, but at the same time I was intimidated by my little knowledge of electronics. So its truly  amazing how much can be done with such simple tools, and how much I learned in past half a year since my good friend Marcin Książek introduced me to Arduino. For me it’s just the essence of the Arduino phenomen – perfect combination of open source hardware, software and the community.

On the side note, I’m bit upset that the same didn’t happened with the .NET Micro Framework, because I think on the software side it has even greater potential (like you can write and debug your code in Visual Studio you know and love). And although I think making the platform open source is a great move, the hardware costs are the biggest barrier right now. Especially if you consider using it for few hobby projects (I don’t know what’s the pricing looks like for mass production).

I will be exploring .NET Micro Framework shortly so stay tuned.


Saturday, January 02, 2010 #

For me one of the coolest new features added in Silverlight 4 is support for capturing video and audio using webcams and microphone. As we’ve seen during Scott Guthrie’s keynote demonstration it is now possible to capture image frames from video stream and apply some interesting effects to it. On top of that we can even process the video and audio streams directly on the client (i.e. inside the browser).

Because Silverlight 4 Beta was already available at PDC I could try the webcam support right away, and so I jumped to refresh my computer vision projects. Unfortunately I never did find time to finish this but I think it’s still worth publishing the code as it is.

One things I was playing with before was the Touchless SDK. It is an open source .NET library for visual object tracking created by Mike Wasserman. In short it identifies objects with specific color characteristics and sends you their position within the image scene enabling to use these objects as input devices. It means you can control your applications without touching the screen or keyboard (and thus it’s called touchless :-)

Original project page is here: http://touchless.codeplex.com/

Touchless SL

Over a year ago I successfully used this library in WPF so now it was quite easy to convert it again to Silverlight 4. You can check it out and download the source code on the demo page. Below I summarize some notes of things I learned about Silverlight 4 API in hopes that Silverlight team can address these issues before final release.

As a starting point I used this excellent summary by Mike Taulty. The main class that handles video processing is the CameraTracker. It extends from VideoSink in order to get access to incoming video samples. Each sample frame is represented by byte array which format is specified by VideoFormat structure. In order to get current VideoFormat you have to override the OnFormatChange method (call to videoSource.VideoCaptureDevice.DesiredFormat will throw exception).

I learned that although VideoFormat specifies the PixelFormatType, currently it is an enum with only two values: Format32bppArgb and Unspecified. It’s WPF counterpart – PixelFormat structure - offers much more including masks and bytes per pixel. And instead of enum we get a static PixelFormats class with number of common formats declared as properties. I hope this will be changed in Silverlight 4 RTM.

Another thing to be aware of is that the video frame buffer is flipped vertically – so you need to read the image lines from bottom to top. I handle this in the GetPixel and SetPixel methods of RawBitmapAdapter helper class:

public RgbColor GetPixel(int x, int y)
{
    int p = _scan0 + (y * _stride) + (x * _bytesPerPixel);
    byte b = _imageData[p];
    byte g = _imageData[p+1];
    byte r = _imageData[p+2];
    return new RgbColor(r, g, b);
}
public void SetPixel(int x, int y, RgbColor color)
{
    int p = _scan0 + (y * _stride) + (x * _bytesPerPixel);
    _imageData[p] = color.Blu;
    _imageData[p+1] = color.Grn;
    _imageData[p+2] = color.Red;
}

In both cases I first calc the offset of pixel in the byte buffer using the scan0 and stride values. Stride is specified in VideoFormat but we have to guess the scan0 value (it specifies the offset of the first line):

if (_stride < 0)
    _scan0 = -_stride * (_height - 1);

Would be helpful the get it in the VideoFormat too. One last comment regarding VideoFormat is I think it’s constructor should be made public.

Before initializing the camera app displays a list of available devices. I tried to bind the collections from my ViewModel however it turns out that calls to GetAvailableVideoCaptureDevices and GetDefaultVideoCaptureDevice return different instances of CaptureDevice so you can’t do something like this:

CaptureDevices = CaptureDeviceConfiguration.GetAvailableVideoCaptureDevices(); 
SelectedCaptureDevice = CaptureDeviceConfiguration.GetDefaultVideoCaptureDevice();

Also I noticed that none of the devices returned by GetAvailableVideoCaptureDevices has IsDefaultDevice flag set, so I had to use FriendlyName to match it.

Because CaptureSource is used in similar way to MediaElement I think it should expose similar API. In particular it would be helpful to get events when it state changes. We should also get some notification when camera is connected or disconnected.

In order to show the markers recognized by Touchless I paint these areas on an overlay. In current version I tried to implement this using a custom MediaStreamSource with double buffering as demonstrated by Pete Brown. It works but you can see the overlay lags significantly in respect to camera video. So I’m going to switch back to WriteableBitmap instead, but I’m not sure how it will perform either. In particular I’m concerned that WriteableBitmap doesn’t have a way to indicate that we are going to begin updating the buffer. In the WPF version you first need to issue Lock to get access to the BackBuffer. I was bit surprised that it’s not required in Silverlight version and I’m concerned how efficient it is without it. 

Altogether the camera API looks very promising and definitively opens many possibilities. However I think the most common scenario people will be trying to implement will be some sort of online IM client, and for this we would also need some generic video codecs for streaming. Right now Silverlight doesn't even have codecs for Jpeg/PNG images so I think it should be added in the first place. In the meantime you can try to use these as an alternative: http://imagetools.codeplex.com/ Updated: Please see this great post by Rene Shulte on saving webcam snapshots to JPEG using FJCore library.

Last thing, unrelated to camera API, is regarding support for commands that was also added in Silverlight 4. I found that the command CanExecute method won’t be required automatically on user input as it happens in WPF so you need to manually send CanExecuteChanged event for each command.


Friday, November 27, 2009 #

I’ve came across this interesting thread on Arduino forum about using IKEA DIODER and other RGB LED strips to build mood/ambient light. This allows you to create the same effect that you can now find on some TVs. I thought it would be a fun little project to do, and here is a short clip to show you the result:

In case you would like to build it yourself here is how I did it.

The Hardware

To get multicolor LEDs some people are hacking IKEA DIODERs but it’s quite expensive, so I followed the advice found here and ordered two RGB Multicolored 1-Meter LED strips from DealExtreme. Those are flexible plastics strips with 30 multicolor LEDs on each (you can also get it as a bar). It has 4 wires with +12V common anode and separate cathodes for RGB channels.

To control the lights I adopted the circuit shown in Markus post. I put it together on Adafruit’s Proto Shield for Arduino (which is nice because it had the IC pattern for the chip). 

P1140742

Instead of multiple transistors this circuit uses the ULN2003 chip, so that each PWM pin from Arduino is connected to one side of the chip and the RGB channels from LEDs are connected to the other side. Because LEDs require 12V voltage there is a separate power connector (Arduino is still powered from USB). Since I had only a 16V power supply I’m also using a 12V voltage regulator. Next to it I have a push switch to turn the LEDs on/off quickly. The 10K potentiometer on the other side is used to select color hue for one of the manual modes. One push button is wired to Arduino reset pin, and the other is used to switch modes.

I know it could be made prettier but I yet have to learn how to design and produce a custom PCB (please contact me if you’d like to help). If you don’t want to solder this yourself here are some other alternatives that you might consider:

For initial testing I used the Arduino sketch written by Markus. It has three modes: specific color selected by a potentiometer, pulsate the specified color, and smooth transition between random colors. You can find more details in his post.

The Software

Of course it would be hard to get ambient light working for every video source you feed to your TV, but its lot easier to do it when signal is going through a PC. This summer I build a new HTPC based on a Zotac ION-ITX board (cause its super small and quiet). Recently I ditched Windows 7 Media Center in favor of open source XBMC, mostly to get hardware accelerated VDAUP playback. Here are the steps to run it on a minimal Ubuntu install (but I admit I took me three days to figure out how to do it properly).

Apart from the video player we also need additional piece of software that will constantly sample the image visible on screen and produce average color for each LED strip. Thankfully there are existing programs that can do this for us. One of them is called Boblight and turns out to work quite well both in Windows and Linux (but again you get a little speed boost on the later).

In essence Boblight runs in backgrounds, accepts color input from clients and converts them to commands that it sends to the devices. I have to say I was pleasantly surprised to see how flexible it is, and how easy it was to configure it for my setup. You can find more details on the configuration on this page, and my config file is included in the download below.

The final piece is the code running on the Arduino that will translate these commands to corresponding light levels for each channel. Boblight uses a simple serial protocol called LTBL (Let There Be Light) that is described here. In the download you will find my sketch that handles this communication.

Currently I have Boblight setup to automatically start before XBMC loads so it will turn on the lights on startup (some advice can be found here). This setup serves me well, but as I said Boblight runs Windows too. And you can also try other software like Momolight, AtmoLightVLC Media Player, and other projects found at Ambilight4PC.


Wednesday, October 28, 2009 #

Now that .NET Framework 4.0 Beta 2 is out let’s look again what is available for building multi-touch application in WPF. In Beta 1 we got only a preview of manipulation and inertia components. With Beta 2 we finally get access to whole touch input system, and it looks very close to what was shown on PDC last year. Here is an overview from MSDN:

Elements in WPF now accept touch input. The UIElement, and UIElement3D, and ContentElement classes expose events that occur when a user touches an element on a touch-enabled screen. The following events are defined on UIElement and respond to touch input. Note that these events are also defined on UIElement3D and ContentElement.

In addition to the touch events, the UIElement supports manipulation. A manipulation is interpreted to scale, rotate, or translate the UIElement. For example, a photo viewing application might allow users to move, zoom, resize, and rotate a photo by touching the computer screen over the photo. The following events have been added to UIElement:

To enable manipulation, set the IsManipulationEnabled to true.

This is exactly what we were waiting for. I started playing with this new API and I will try to share some samples soon. But here is one problem I run into already. When I tried to use touch in ordinary WPF application, I noticed that all Buttons have a weird behavior, so that when I touched the Button it didn’t go into a pressed state immediately (I’m testing this on HP TouchSmart). Instead it only fires the Click event when I lift the finger. Testing it more I noticed that on any UIElement it won’t fire the MouseDown event until I lift the finger or slide it quite a bit.

To help me diagnose this issue I created a simple test application shown here:

multitouchtest

From left to right I have gray rectangles that react to input events from mouse, stylus and touch. Each rectangle will change color to orange when mouse or stylus is over, and to green when is pressed. In addition, on press I capture the appropriate device and during capture the border changes color to red.

This test confirms that when I use touch panel then the xxxDown events don’t arrive immediately regardless of the device used. I spent quite a while trying to figure it out and trying various settings in both the Touch and Pen Control Panel and the NextWindow’s USB Config utility.

Finally I noticed that somehow this works perfectly fine when I use manipulations. From this I quickly found that this problem goes away when you set IsManipulationEnabled property on the element. Turns out that the side effect of setting this property to true is also changing the stylus properties to disable PressAndHold and Flicks gestures on the element. This explains this problem because stylus engine has to postpone these events trying to interpret the gestures. You can see the difference by selecting the appropriate checkbox on the window.

However although now we get the xxxDown events immediately (which will be very useful for manipulations) this doesn’t fix the problem with Button pressed state. You will notice that MouseDown event is still deferred regardless of the IsManipulationEnabled settings. I believe that in this case this might be caused by input logic in Windows itself. In fact the only way I could affect this was to force the touch panel to report input as mouse events (using NextWindow’s USB Config tool).

In the end I believe the proper fix for this would require extending all WPF built-in controls so that they understand the touch events and react accordingly. At the same time some controls might get some multi-touch specific behaviors as well. For example it was already announced that ScrollViewer will be enhanced to support multi-touch panning. In case of Button it was mentioned several times, that when simultaneous touches occur the correct behavior should be to fire the Click event only after the last touch is lifted. I hope that we get some of these enhancements in the RTM timeframe.

You can download the sample code here.


Monday, July 06, 2009 #

Last Friday I’ve received new Futaba S3001 servos. Turns out they are more easier to modify to Hitec’s, and at the same seem more reliable. I’ve simply followed this Instructable, and you can also find some additional photos in my gallery. What most important the servos are also easier to calibrate, so now my SERB will actually stop in place when I want it.

Below is a short video of the completed SERB robot where it just runs in random directions:

This weekend I’ve also started looking at Microsoft Robotics Development Studio 2008. This environment promises easy entry level to robotics. However this is true only when you have a compatible robotics platform (like Lego Mindstorms NXT, fishertechnik, iRobot and few others). There are pretty good tutorials on how to control these robots both from C# and from VPL. However before I can apply them to my SERB robot, first I need to implement the hardware interface and generic services to control the robot. Not much information on this and closest what I found so for is the Robotics Tutorial 6 – Remotely Connected Robots. It would be cool to get more detailed example on writing such services, but fortunately source code of services for other robots is included. In particular I’m trying to understand the code for iRobot and this additional service for VEX Robotics. If you know of any other good examples or tutorials please let me know.


Thursday, July 02, 2009 #

Few weeks ego we went to an exhibition in one of Kraków’s malls to celebrate the 100 year anniversary of robotics. Besides some nice exhibits there was also a place where kids could try to build a robot from Lego Mindstorms NXT and Fishertechnik sets. We spent few hours there with my older son Jaś and even managed to build a walking robot.

It was fun for both of us so I started looking if we could continue playing with robots at home. Unfortunately most of the sets I found are pretty expensive (starting at $200). This is where my good pal Marcin Książek turned me to the Arduino electronic prototyping platform.

Arduino is really a simple and cheap microcontroller kit that can be easily connected to a PC and programmed. What makes it fun is that there are also many extensions that come as “shields” and adapters for the board and add capabilities such as XBee and Ethernet communication, accelerometer, DC motor control, GPS or even a touch LCD. The platform is open source so there are tons of information and fun projects on the web. Good place to start would be the Arduino Experimentation Kit (ARDX) – you can buy the kit from oomlout, but it’s also open source so you can download all guides and buy the parts in your local electronics store yourself. I also enjoy reading the book “Getting started with Arduino” by Massimo Banzi. And make sure to send the Arduino gift guide to your relatives. There are even Arduino user groups such as Howduino in Liverpool.

[In Poland you can buy Arduino from Nettigo]

All of this makes Arduino a great basis for building a simple robot. And in fact there is already a project on Instructables that shows exactly How to build a Arduino Controlled Servo Robot. Again this project is open source so you can buy a kit from oomlout or download the blueprints and find all the parts yourself. The body of the robot is done from acrylic sheets and I found a local shop with a laser cutter that could cut the parts for me. Most of the other parts can be easily found in your local DIY store.

One exception are the servo motors. Normal servos for RC models are constrained to movement in 180 degrees range, but what we need here is a “Continuous Rotation” servo. You can get one that was pre-modified such as Parallax, GWS S35 or Hitec HSR-1425CR. Another option is to modify the servo yourself, and there are also many instructions on how to do it on the web. I found that it’s really not hard to do, but you have to work a bit on the calibration.

So having all the parts I could finally begin the assembly. Below you can see is a photo gallery where we build our first SERB robot. As you can see I’m one happy geek dad, because both kids were pretty interested with this.

Right now the robot can’t do much besides running around in random directions, but I have some plans to make it smarter.

  1. Add remote control via Xbox pad or WiiMote. There is already a project showing how to use a netbook to control the robot via Skype. But being a .NET geek I would like to use Microsoft Robotics Studio for this.
  2. Add wireless connection with XBee so that robot can roam freely without cables the but still being controlled from the PC.
  3. Add some sensors so the robot gets more information from the world. I think first I would add bumpers to detect obstacles as shown in this project. Later I might also add wheel encoders (such as Nubotics WheelWatcher) for odometry.
  4. Play with some AI algorithms.

So it looks like I already have found myself a summer project :-)


Wednesday, June 17, 2009 #

Glenn Block TourNext week several .NET User Groups in Poland will host a special guest - Glenn Block, Program Manager in the .NET FX team (and previously PM for p&p “Prism”). As you probably already know, Glenn is the man behind the Managed Extensibility Framework (MEF) project and thus this will be the main topic of his talks:

Building openly extensible applications in .NET 4.0

Are you tired of building monolithic style apps? Are you tired of hacking your app to bits to meet just one more requirement. Do you want to enable third parties to provide add-on value to your apps? 

If the answer to any of these is yes, then come learn about the new Managed Extensibility Framework which ships in .NET 4.0. 

Applications built on MEF dynamically discover and compose available components at runtime. This makes MEF ideal for third-party extensibility scenarios, where the type and number of extensions are undefined. With MEF you can enable customers and third-parties to take your apps where no man has gone before.

During the tour Glenn will visit following cities:

You can register for the meeting in the city near you by clicking on the links above. More information on the official website. Also visit Glenn’s blog and leave him a comment if you like to hear about any particular topic.


Monday, April 27, 2009 #

Wczoraj zakończyła się rejestracja do konkursu o tytuł Speaker Idol 2009, a zatem znamy już nazwiska siedmiu śmiałków którzy zmierzą się ze sobą w środowy wieczór. Oto oni:

  1. Marcin Kruszyński – Innowacje w Silverlight 3
  2. Michał Brzozowski – Zasada „SOLID”
  3. Wiesław Nizio – Microsoft Excel i Windows Forms. Co wybrać Ole Automation, czy OleDb?
  4. Jakub Malinowski – CRUD UI dla danych w .Net
  5. Krystian Czepiel – Wykorzystanie Modelu MVC przy tworzeniu aplikacji ASP.NET
  6. Łukasz Podolak – Software Craftsmanship
  7. Arkadiusz Beer – Pex: Zautomatyzowane generatory testów

Już teraz możecie się zapoznać z tematami ich prezentacji opublikowanymi na stronie konkursu

Serdecznie zapraszamy na spotkanie – wieczór zapowiada się naprawdę interesująco!


Thursday, April 16, 2009 #

Speaker Idol 2009Chcesz sprawdzić się w roli prezentera? Weź udział w konkursie Speaker Idol i zostań idolem publiczności CodeCamp 2009! Wystarczy 10 minutowa prezentacja. Zasady są proste, a nagrody ciekawe...

Co należy zrobić?

  1. Przygotować krótką prezentację (do 7-10 minut).
  2. Zgłosić swoje uczestnictwo do 26 kwietnia 2009 (niedziela) włącznie.
  3. Wygłosić prezentację na spotkaniu KGD 29 kwietnia 2009 (środa) i zachwycić publiczność.
  4. Wygrać w głosowaniu publiczności i odebrać nagrodę!

Zachęcamy do nadsyłania swoich zgłoszeń na adres si@codecamp.pl

Co można wygrać?

  • Możliwość wystąpienia na CodeCamp 2009
  • Visual Studio 2008 Professional
  • Lincencje na produkty firmy Telerik
    Do wyboru: OpenAccess for ORM, Sitefinity Telerik Reporting, RadControls for Winforms, RadControls for ASP.NET Ajax, RadControls for WPF lub RadControls for Silverlight
  • Nevron Chart for .NET Lite edition
  • Narzędzia NDepend
  • Plecaki Microsoft
  • Kamerka internetowa i myszka
  • i inne...

Więcej informacji na stronie: http://codecamp.pl/pl/speakeridol.aspx

Strona spotkania: http://ms-groups.pl/kgd.net/47_spotkanie/default.aspx


Tuesday, March 10, 2009 #

4DevelopersShort while after I wrote about resources for multi-touch on Windows 7 Daniel D left a comment that got me very excited:

MultiTouchVista now has a driver that emulates multitouch hardware for Windows 7

I got to try it out myself! Bit later I got everything up and running and I’m happy to report that it’s all true: you can now effectively emulate multi-touch devices under Windows 7. You can see it yourself on this video. In fact it works so well that I was able to demonstrate it last Saturday at 4Developers conference.

That being said, the process to get it running involves few steps so I thought it would help to have a walkthrough to follow for anyone who would like to try it. So here it goes.

Hardware

Of course you need a PC. Note that computer vision puts CPU to heavy use, and I was able to get barely 15 FPS on my laptop with 1.6Ghz, and thus the interaction wasn’t very smooth. In fact Windows 7 specification requires multi-touch devices to report at least 50hz per finger.

The software that we are going to use allows to work with number of protocols. One option is to simply connect multiple USB mice to emulate multi-touch. But it is much more fun to build your own surface-like table. For start you can built a MTmini table designed by Seth Sanders – it takes about 20 minutes to build and all you will need is:

  • Webcam – people try different kinds of webcams for this, but I think even something simple with decent video should work. I have great results using Logitech QuickCam Pro 9000 because it has excellent video quality in 640x480 and most important you can set the focus and other parameters manually.
  • Tracing paper – it’s purpose is to diffuse the light coming to the camera so only objects very close to the surface (i.e. your fingers) look sharp. Initially I used just ordinary printer paper, but tracing paper gives more even image.
  • Photo frame – no, I’m not talking about any fancy LCD frames. It’s just plain wood frame (word of advice: bad things will happen if you try to repurpose frame from your wedding photo). Frame I use has A4 paper format (210mm × 297mm) and fits nicely on top of the carton box from the packs of A4 office paper.
  • Cardboard box, duck tape, and scissors.

When you have all the materials here is what you do:

  1. Put the camera at the bottom of the box facing up, and glue it with the duck tape. You might need to cut out the hole for the camera’s USB cord.
  2. Remove the back board from the photo frame and put only the tracing paper on the glass.
  3. Put the frame on top of the box.

You can also watch this video for step by step instructions.

Here is my completed setup:

My MTmini setup

Software

Obviously you need to have Windows 7 Beta installed. So hopefully you was able to download it while it lasted.

Next thing to download and configure is tBeta. Here is description of it from official website:

The Beta, tbeta for short, is a open source/cross-platform solution for computer vision and multi-touch sensing. It takes an video input stream and outputs tracking data (e.g. coordinates and blob size) and touch events (e.g. finger down, moved and released) that are used in building multi-touch applications. tbeta can interface with various web cameras and video devices as well as connect to various TUIO/OSC enabled applications and supports many multi-touch lighting techniques including: FTIR, DI, DSI, and LLP with expansion planned for the future (custom modules/filters).

Download the software from the above website and unzip to folder you choose. Before you run it you might want to change configuration to use higher resolution if your webcam supports it. Go to \tbeta\data folder and open config.xml file. Specify the correct values for  WIDTH and HEIGHT in CAMERA_0 node.

One more thing I did to get more predictable results was to turn off all automatic adjustments in camera software. For Logitech QuickCam this includes switching to manual focus, and turning off Automatic settings for RightLight, exposure and gain. We are not going to move the camera around or dramatically change the lightning conditions so it will be best to make all settings constant.

When you run tbeta.exe you should see something like this:

tBeta

The tricky part is calibration, which means adjusting the sliders for all filters at the bottom so that you get best recognition accuracy. Unfortunately I don’t know any rules that would help you with this. You would have to play with the settings a bit to get a feeling how it works. If you make it right you should see an outline and unique id associated with each of your fingers as seen on the above screenshot. When all works well you can minimize this window (press spacebar) so it won’t consume CPU for rendering.

The last piece of this puzzle is MultiTouchVista project that I mentioned in previous post as well. This framework, which actively developed by Daniel D himself (aka nesher), adds support of multi-touch to the current version of WPF. But for purpose of this article the important thing is the recently added Windows 7 multi-touch driver. It’s not even officially released yet, so you would need to go directly to Source Code tab and download latest bits (I run it on changeset 18685).

You can follow instruction in this video on how to install the driver and run the services. Here is a short summary of the same:

  1. Compile all projects for MultiTouchVista. Follow instructions on this page.
  2. From Windows Explorer go to MultiTouchVista\Main Source folder, and while holding down Shift right click on Multitouch.Diver folder and select “Open Command Window Here”.
  3. In this window type: install driver.cmd, press Enter and ignore all warnings about not certified drivers.
  4. Open Device Manager and confirm that new driver called “Universal Software HID device” is installed under “Human Interface Devices”. Video suggests to disable and then enable the driver to ensure it is working correctly.
  5. To verify the driver is installed you can open “Pen and Touch” applet from Control Panel. It should now contain the Panning tab.
  6. Back in Explorer go to MultiTouchVista\Main Source\Output folder and run  Multitouch.Service.Consol.exe. By default it loads the MultipleMiceInputProvider so if you should see red dots indicating “virtual cursor” for each USB mouse you have attached. But to use your MTmini table you would need to change configuration so it connects to tBeta through TUIO interface.
  7. From MultiTouchVista\Main Source\Output run Multitouch.Configuration.WPF.exe. From list of Available devices select Tuio and click the arrow button in middle to make it Active device. Then click “Restart service” button to apply the new configuration.
  8. Finally go to MultiTouchVista\Main Source\Multitouch.Driver.Console\bin\debug and run Multitouch.Driver.Console.exe.
  9. Now if you put finger on surface, you should see the input messages coming to the console window. And of course now you should be read to use it as input device for Windows.

Try it on several touch enable applications that I listed in my last post (XPS Viewer and Paint are great for quick demo). You can also find some C++/C# examples on MSDN Code Galery.

Great thanks for Daniel D for leaving this inspiring comment, and even bigger compliments for developing such great library. Please don’t hesitate to let me know if I can help with anything.