<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Coding 4 Fun</title>
    <atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/coding4fun/rss"/>
    <generator>Rev9</generator>
    <description></description>
    <link>http://channel9.msdn.com/coding4fun/rss</link>
    <language>en</language>
  <item>
      <title>Asteroids, C#, 3D and OpenGL</title>
      <description><![CDATA[<p>Today's project is a simple example of using OpenGL, C#/WinForm to build a introductory game. What I liked about it is that it really is pretty simple, simple to follow the code, simple to understand and simply easy to get started with...</p><h2><a href="http://www.codeproject.com/Articles/308167/A-Basic-3D-Asteroid-Game-in-openGL-with-Csharp" target="_blank">A Basic 3D Asteroid Game in openGL with C#</a></h2><blockquote><p>This article is intended for beginners who want to start with 3D game programming and don’t know where to start. It is programmed in Opengl using VS 2008 and a small graphic engine I made myself called Shadowengine. It has the basics of what a game should have: a Score, levels of difficulty and a life counter. All this is written in a small number of code lines, with the objective of being simple and understandable.</p><p>The first problem I had to achieve is the scene to look like outer space. For that issue, I set the background color to black. In opengl, it is set this way:</p><p>...</p><p>The score is a number which increases over time and it grows faster everytime I pass a level. The level increases every 450 frames.</p><p>The last issue I had to address is the problem of asteroid collision. I make for the ship three positions (one for the ship and two for the wings) and every once in a while, I check the distance between all the asteroids and those three positions. If it is under a predefined value, I execute the collision event.</p><p>The project has 6 classes:</p><ul><li><em>AsteroidGenerator.cs</em> - It handles the creation of asteroids in random places and with random sizes and speeds. It also has the method to query whether or not there has been a collision between the spaceship and an asteroid. </li><li><em>Asteroid.cs</em> - It handles all concerning an asteroid such as the movement, texture selection, drawing, among others. </li><li><em>Star.cs</em> - It has a method to create random white points and to draw them. </li><li><em>Camera.cs</em> - It handles the selection of the user camera and to set the right perspective view of the scene. </li><li><em>SpaceShip.cs</em> - This class contains all methods and attributes regarding the spaceship, such as movement, drawing, etc. </li><li><em>Controller.cs</em> - This class manages the game creation, game logic and contains all the classes needed to run the game. Here is a portion of code: </li><li>... <p><em>Main.cs</em> - This is the form which contains this visual components of the game. It contains the controller class and gives the player information through proper windows controls. It has a timer to periodically draw the scene and has the code for texture and object loading.</p><p>...</p></li></ul></blockquote><p>While written for VS2008, for me it loaded in VS2010 just fine (once it converted). Once loaded it compiled and ran the first time...</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B3%5D-36.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B1%5D-44.png" alt="image" width="213" height="282" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML142cd590%5B3%5D.png" target="_blank"><img title="SNAGHTML142cd590" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML142cd590_thumb.png" alt="SNAGHTML142cd590" width="531" height="407" border="0"></a></p><p>The game is very simple. Using WASD you move your ship to avoid the oncoming asteroids.</p><p>And while the comments/strings are not in English the code is easy enough to understand;</p><p><pre class="brush: csharp">public Main()
  {
      InitializeComponent();
      hdc = (uint)pnlViewPort.Handle;
      string error = &quot;&quot;;
      //Comando de inicializacion de la ventana grafica
      OpenGLControl.OpenGLInit(ref hdc, pnlViewPort.Width, pnlViewPort.Height, ref error);
      //inicia la posicion de la camara asi como define en angulo de perspectiva,etc etc
      controladora.Camara.SetPerspective();
      if (error != &quot;&quot;)
      {
          MessageBox.Show(&quot;Something happened&quot;);
      }

      #region lights

      //Configuracion de las luces
      float[] materialAmbient = { 0.5F, 0.5F, 0.5F, 1.0F };
      float[] materialDiffuse = { 1f, 1f, 1f, 1.0f };
      float[] materialSpecular = { 1.0F, 1.0F, 1.0F, 1.0F };
      //brillo del material
      float[] materialShininess = { 1.0F };
      //posicion de la luz
      float[] ambientLightPosition = { 10F, -10F, 10F, 1.0F };
      // intensidad de la luz en RGB
      float[] lightAmbient = { 0.85F, 0.85F, 0.85F, 1.0F };

      Lighting.MaterialAmbient = materialAmbient;
      Lighting.MaterialDiffuse = materialDiffuse;
      Lighting.MaterialSpecular = materialSpecular;
      Lighting.MaterialShininess = materialShininess;
      Lighting.AmbientLightPosition = ambientLightPosition;
      Lighting.LightAmbient = lightAmbient;

      #endregion

      //Habilita las luces
      Lighting.SetupLighting();
      //cargar texturas
      ContentManager.SetModelList(&quot;modelos\\&quot;);
      ContentManager.LoadModels();
      ContentManager.SetTextureList(&quot;texturas\\&quot;);
      ContentManager.LoadTextures();
      //AudioPlayback.SoundDir = &quot;sonidos\\&quot;;
      //AudioPlayback.LoadSounds();
      controladora.CreateObjects();
      //Color de fondo
      Gl.glClearColor(0, 0, 0, 1);//red green blue alpha 
      Gl.glShadeModel(Gl.GL_SMOOTH);  
  }

  private void tmrPaint_Tick(object sender, EventArgs e)
  {
      // limpia opengl
      Gl.glClear(Gl.GL_COLOR_BUFFER_BIT | Gl.GL_DEPTH_BUFFER_BIT);
      //dibuja la escena
      controladora.DrawScene();
      //cambia los buffer
      Winapi.SwapBuffers(hdc);
      //termina de pintar
      Gl.glFlush();

      if (started)
      {
          score &#43;= 1;
          count1&#43;&#43;;
          count2&#43;&#43;;
          levelCount&#43;&#43;;
          if (levelCount == 450)
          {
              level&#43;&#43;;
              AsteroidGenerator.GenerateAsteroid(35, false);
              lblLevel.Text = level.ToString();
              levelCount = 0;
          }
          if (count1 == 4)
          {
              lblScore.Text = score.ToString();
              count1 = 0;
              lives = controladora.Nave.Vidas;
          }
          if (count2 == 20)
          {
              ShowLife(lives);
              count2 = 0;
              if (lives == 0)
              {
                  started = false; 
                  MessageBox.Show(&quot;Game Over&quot;);
                  controladora.ResetGame();
                  score = 0;
                  level = 1;
                  lives = 3;
                  started = true;
                  count1 = 0;
                  count2 = 0;
                  lblLevel.Text = level.ToString();   
              }
          }
      }
  }
</pre></p><p>If you've thought about writing a 3D game, be it space or not, this project might be a good starting place for you...</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/coding4fun/rss&WT.dl=0&WT.entryid=Entry:RSSView:ae8d46a81d8a47f092a79ffb01729396">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Asteroids-C-3D-and-OpenGL</comments>
      <link>http://channel9.msdn.com/coding4fun/blog/Asteroids-C-3D-and-OpenGL</link>
      <itunes:summary>Today&#39;s project is a simple example of using OpenGL, C#/WinForm to build a introductory game. What I liked about it is that it really is pretty simple, simple to follow the code, simple to understand and simply easy to get started with...A Basic 3D Asteroid Game in openGL with C#This article is intended for beginners who want to start with 3D game programming and don’t know where to start. It is programmed in Opengl using VS 2008 and a small graphic engine I made myself called Shadowengine. It has the basics of what a game should have: a Score, levels of difficulty and a life counter. All this is written in a small number of code lines, with the objective of being simple and understandable.The first problem I had to achieve is the scene to look like outer space. For that issue, I set the background color to black. In opengl, it is set this way:...The score is a number which increases over time and it grows faster everytime I pass a level. The level increases every 450 frames.The last issue I had to address is the problem of asteroid collision. I make for the ship three positions (one for the ship and two for the wings) and every once in a while, I check the distance between all the asteroids and those three positions. If it is under a predefined value, I execute the collision event.The project has 6 classes:AsteroidGenerator.cs - It handles the creation of asteroids in random places and with random sizes and speeds. It also has the method to query whether or not there has been a collision between the spaceship and an asteroid. Asteroid.cs - It handles all concerning an asteroid such as the movement, texture selection, drawing, among others. Star.cs - It has a method to create random white points and to draw them. Camera.cs - It handles the selection of the user camera and to set the right perspective view of the scene. SpaceShip.cs - This class contains all methods and attributes regarding the spaceship, such as movement, drawing, etc. Controller.cs - This class man</itunes:summary>
      <pubDate>Wed, 22 Feb 2012 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Asteroids-C-3D-and-OpenGL</guid>
      <dc:creator>Greg Duncan</dc:creator>
      <category>csharp</category>
      <category>coding4fun</category>
  </item>
  <item>
      <title>RC Helicopter, Arduino and of course, the Kinect</title>
      <description><![CDATA[<p>Today's project in a cool inspirational Kinect to Arduino to Helicopter hardware project...</p><h2>Flying a S107 RC Helicopter using the Microsoft Kinect and the Arduino Uno</h2><blockquote><p>Flying a S107 RC Helicopter using the Microsoft Kinect and the Arduino Uno.</p><p>The Kinect detects my hands, head, and hips. This information is translated into x, y, z coordinates, processed with some 7th grade Algebra, and then sent to the Arduino over the serial port. The Arduino receives the signal, and converts it to a 38 kHz Infrared signal that the S107 can understand.</p><p>I've provided more information on this page: codingfun.collinboy.net</p><p>Hope to have this demo and other cool gadgets at the Kitsap Maker Festival in June!</p><p>Final note: The &quot;I did it&quot; line at the end of the video is in memory of my son Collin. I'd give all this up to have you back kiddo!</p><p>...</p><p>How to fly a S107 helicopter with the Kinect?</p><ul><li>You will need a Kinect with power adapter to connect to a Windows 7 (or 8) computer. Xbox Kinect or Windows Kinect will work. </li><li>You will need an Arduino Board. </li><li>You will need various resistors, transistors, IR LEDs. </li><li>You will need some creativity. </li></ul><p>This is not a step by step tutorial. I will provide the Arduino code that gets the Helicopter flying, but the rest is up to you to be creative.<br>So let’s get to the hard part first. Getting the Arduino to talk to the S107. The S107 speaks a specific language transmitted over a 38 kHz signal. <br>The signal structure that I used for the S107 is as follows:<br>(Note: Channel &quot;A&quot; uses Throttle Values 0 to 127. Channel &quot;B&quot; uses Throttle Values 128 to 255.)</p><ol><li>Start Signal: 2000 us </li><li>Pause: 2000 us </li><li>Rudder Signal: 8 bits of transmission (for example 127 is &quot;01111111&quot;, 63 is &quot;00111111&quot;) </li><li>Elevator Signal: 8 bits of transmission </li><li>Throttle Signal: 8 bits of transmission </li><li>Trim Signal: 8 bits of transmission </li><li>End Signal: 300 us </li></ol><p>With that, let’s look at the code: <a href="http://codingfun.collinboy.net/S107_IR_Code.ino">Here is a nice formatted link to the Arduino File</a>.</p><p>...</p><p>As you can see, all you need to do is feed the void Transmit() with integer values between 0 and 127 (or 128 to 255 for Channel &quot;B&quot; ). Do this from the void loop().</p><p>You can actually alternate between the &quot;A&quot; and &quot;B&quot; channel without any problems (that I've encountered).</p><p>You may also see that there is no code in there for communicating with the Kinect. I wanted to give a clean version of the S107 code. The Kinect serial input requires more code in the void loop().</p><p>Reading from the serial is a lot of hassle. I will make an update soon to explain how to read from the serial port.</p><p>For the Kinect project, I used the Microsoft Kinect SDK software to determine the location of my hands relative to head and hips. This gave me a y-coordinate distance that could be scaled from 0 to 127.</p><p>The Kinect can also be used to measure distances relative to the sensor. Again, this data can easily be converted to scaled z-coordinate values between 0 and 127.</p><p>The fun part was determining the best use of x, y and z coordinates. You only have 2 hands, so controlling a 3 channel Heli takes some thinking.</p><p>Also fun is determining how to initialize the Heli (interlocks to avoid premature takeoff) and how to incorporate a kill switch.</p><p>I hope that this will help inspire some creativity to use the Kinect with the Arduino boards.</p></blockquote><p><strong>Project Information URL: </strong><a title="http://codingfun.collinboy.net/" href="http://codingfun.collinboy.net/">http://codingfun.collinboy.net/</a>, <a title="http://www.youtube.com/watch?feature=player_embedded&amp;v=hfqh46s-BPM" href="http://www.youtube.com/watch?feature=player_embedded&amp;v=hfqh46s-BPM">http://www.youtube.com/watch?feature=player_embedded&amp;v=hfqh46s-BPM</a> [Project found via <a href="http://blog.makezine.com/2012/02/14/kinect-gesture-controlled-rc-helicopter/">Kinect Gesture-Controlled RC Helicopter</a>]</p><p><strong>Project Download URL:</strong> <a title="http://codingfun.collinboy.net/" href="http://codingfun.collinboy.net/">http://codingfun.collinboy.net/</a></p><p><strong>Project Source URL:</strong> <a title="http://codingfun.collinboy.net/" href="http://codingfun.collinboy.net/">http://codingfun.collinboy.net/</a></p><p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/hfqh46s-BPM&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/hfqh46s-BPM&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p><p><pre class="brush: text">// Connect (&#43;) of IR LED to 5Vcc
// connect (-) to pin 4 with a 100 Ohm resistor in line.  For best results make a transistor circuit with external power source

#define RED 4    // the output pin of the IR LED

void setup() {
    pinMode(RED, OUTPUT);    // set IR LED (Pin 4) to Output
}

void loop() {
//Do you magic here.  The code directly below just throttles up to 60 and back down to 0.  
//You can get data from the serial port, a joystick, or whatever.  You just need to translate your input into values between 0 and 127.
//Pass those values to Transmit( ) as an integer between 0 and 127 and that's it!

    int t;
    for (t = 0; t &lt; 40; t&#43;&#43;) {
        Transmit(63, 63, t, 63);  //Rudder = 63, elevator = 63, throttle = t, trim = 63
             // Transmit(63, 63, ((40 - t) &#43; 128), 63); //This would cause Channel &quot;B&quot; to throttle down

    }

    for (t = 40; t &gt; 0; t--) {
        Transmit(63, 63, t, 63);
             // Transmit(63, 63, ((40 - t) &#43; 128), 63); //This would cause Channel &quot;B&quot; to throttle up 
    }
} //End loop()

void Transmit(byte rudder, byte elevator, byte throttle, byte trim) {
    static byte Code[4];
    byte mask = 128;     //bitmask
    int i;

    Code[0] = rudder; // 0 -&gt; 127; 63 is the midpoint.
    Code[1] = elevator; // 0 -&gt; 127; 63 is the midpoint.
    Code[2] = throttle; // 0 -&gt; 127; 0 is throttle off
    Code[3] = trim;    // Haven't messed with this
    
    OutPulse(2002);  // Start 38Khz pulse for 2000us (2002us is evenly divided by 26)
    delayMicroseconds(2000);  // 2000us off.

    for (i = 0; i&lt;4; i&#43;&#43;) {        // Loops through the Code[]
        for (mask = 128; mask &gt; 0; mask &gt;&gt;=1) {    // See Arduino reference for bit masking (really cool stuff!)
        OutPulse(312);         // Sends 312 pulse each loop

            if(Code[i] &amp; mask) {          //If both bit positions are 1 you get 1              
                delayMicroseconds(688);     // send 1 (700 off)
            } 
            else {
                delayMicroseconds(288);     // send 0 (300 off)
            }
        } //End mask loop
    }  //End i loop

    OutPulse(312);  //Send 300 microsecond Closing Pulse
    delay(60);       

} // End Transmit


void OutPulse(int Pulse) {  //sends 38Khz pulses over the Pulse Length
    int p;

    for(p = 0; p &lt; (Pulse / 26) - 1; p&#43;&#43;) {  //Takes about 26 microseconds per loop
        digitalWrite(RED, HIGH);
          delayMicroseconds(10);
        digitalWrite(RED, LOW);
          delayMicroseconds(10);
    }
}  //End OutPulse</pre></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/coding4fun/rss&WT.dl=0&WT.entryid=Entry:RSSView:5cbb0b61ab9d4d9a961d9ffc00044df0">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/kinect/RC-Helicopter-Arduino-and-of-course-the-Kinect</comments>
      <link>http://channel9.msdn.com/coding4fun/kinect/RC-Helicopter-Arduino-and-of-course-the-Kinect</link>
      <itunes:summary>Today&#39;s project in a cool inspirational Kinect to Arduino to Helicopter hardware project...Flying a S107 RC Helicopter using the Microsoft Kinect and the Arduino UnoFlying a S107 RC Helicopter using the Microsoft Kinect and the Arduino Uno.The Kinect detects my hands, head, and hips. This information is translated into x, y, z coordinates, processed with some 7th grade Algebra, and then sent to the Arduino over the serial port. The Arduino receives the signal, and converts it to a 38 kHz Infrared signal that the S107 can understand.I&#39;ve provided more information on this page: codingfun.collinboy.netHope to have this demo and other cool gadgets at the Kitsap Maker Festival in June!Final note: The &amp;quot;I did it&amp;quot; line at the end of the video is in memory of my son Collin. I&#39;d give all this up to have you back kiddo!...How to fly a S107 helicopter with the Kinect?You will need a Kinect with power adapter to connect to a Windows 7 (or 8) computer. Xbox Kinect or Windows Kinect will work. You will need an Arduino Board. You will need various resistors, transistors, IR LEDs. You will need some creativity. This is not a step by step tutorial. I will provide the Arduino code that gets the Helicopter flying, but the rest is up to you to be creative.So let’s get to the hard part first. Getting the Arduino to talk to the S107. The S107 speaks a specific language transmitted over a 38 kHz signal. The signal structure that I used for the S107 is as follows:(Note: Channel &amp;quot;A&amp;quot; uses Throttle Values 0 to 127. Channel &amp;quot;B&amp;quot; uses Throttle Values 128 to 255.)Start Signal: 2000 us Pause: 2000 us Rudder Signal: 8 bits of transmission (for example 127 is &amp;quot;01111111&amp;quot;, 63 is &amp;quot;00111111&amp;quot;) Elevator Signal: 8 bits of transmission Throttle Signal: 8 bits of transmission Trim Signal: 8 bits of transmission End Signal: 300 us With that, let’s look at the code: Here is a nice formatted link to the Arduino File....As you can see, all you need to do is feed t</itunes:summary>
      <pubDate>Wed, 22 Feb 2012 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/kinect/RC-Helicopter-Arduino-and-of-course-the-Kinect</guid>
      <dc:creator>Greg Duncan</dc:creator>
      <category>coding4fun</category>
      <category>kinect</category>
  </item>
  <item>
      <title>Ray Shouts about v1</title>
      <description><![CDATA[<p>Friend of the Gallery, Ray Chambers, has begun updating his many educational Kinect for Windows applications and tutorials to reflect the changes in the v1 SDK. In the coming weeks, I'll be dribbling out all his updates (if you can't wait you can also head over to his <a href="http://raychambers.wordpress.com" target="_blank">blog</a>)</p><h2>Kinect SDK Full Release!–Shout Application!</h2><blockquote><p>The Kinect SDK V1 for windows has had multiple changes made to it since the Beta 2. The whole tracking system has changed and it has been built together so that samples are easy to drag and drop in from the tool box.</p><p><strong><em>Biggest Changes</em></strong></p><ul><li><em><em><strong>Tracking: –</strong>You can play around with the settings much more and it feels easier to apply smoothing to your movement. Much of the jitter appears to be gone.</em></em> </li><li><em><em><strong>Near Mode: – (ONLY ON WINDOWS KINECT) – </strong>Perhaps one of the most useful changes to the Kinect is that you can now start tracking things up to 40 CM close to the camera. I can see this being very useful for SEN students, however it is only available if you have the Windows Kinect.</em></em> </li><li><em><em><strong>Variables: – </strong>The first thing which threw me off track was the amount of changes that have occurred. Many of the video tutorials which I have used showing you how to edit the elevation angle are no longer relevant.</em></em> <p>(runtime.NuiCamera.ElevationAngle != (int)slider1.Value) is now</p><p>(kinectSensorChooser1.Kinect.ElevationAngle != (int)slider1.Value)</p></li></ul><p><strong><em>Useful Facts</em></strong></p><ul><li><strong><strong><em>If you install V1 and try to download and run BETA 2 applications. They will not run. There have been too many changes and you will need to work through a lot of errors.</em></strong></strong> </li><li><strong><strong><em>If you are considering buying a Kinect for Windows device, please weigh up the options and consider what you will be using it for. If you want to use it on your Xbox and your Windows machine you will be disappointed. The Kinect for Windows device does not run on the Xbox 360. (I have tried this myself as I am lucky enough to have one of the new devices).</em></strong></strong> </li><li><strong><em>Xbox 360 Kinect will run with the new SDK, however you will not be able to carry out near mode on it. There have been some changes in the hardware which allow this. </em></strong></li></ul><p>I recently had the pleasure of working with Shout Learning and I have been implementing some applications into Lodge Park Technology College. These applications would help teach students about the water cycle. You can preview the video below. This original application has now been adapted so that it can run with the full version of the SDK. You can download this application here with the source. The source should be helpful to some of you programming with the SDK V1 for the first time.</p><p><a href="https://skydrive.live.com/redir.aspx?cid=2852c4bb97c60a65&amp;resid=2852C4BB97C60A65!339&amp;parid=root">Click here to download the sample application</a> – All future applications will be available to download from the <a href="http://raychambers.wordpress.com/2012/02/07/kinect-sdk-full-releaseshout-application/pil-network.com">Microsoft Partners In Learning Network</a>. Sign up with your live ID and get access to materials by searching for the Kinect or the K-Team.</p></blockquote><p><strong>Project Information URL:</strong> <a title="http://raychambers.wordpress.com/2012/02/07/kinect-sdk-full-releaseshout-application/" href="http://raychambers.wordpress.com/2012/02/07/kinect-sdk-full-releaseshout-application/">http://raychambers.wordpress.com/2012/02/07/kinect-sdk-full-releaseshout-application/</a></p><p><strong>Project Download URL:</strong> <a title="https://skydrive.live.com/?cid=2852c4bb97c60a65&amp;id=2852C4BB97C60A65%21339" href="https://skydrive.live.com/?cid=2852c4bb97c60a65&amp;id=2852C4BB97C60A65%21339">https://skydrive.live.com/?cid=2852c4bb97c60a65&amp;id=2852C4BB97C60A65%21339</a></p><p><strong>Project Source URL:</strong> <a title="https://skydrive.live.com/?cid=2852c4bb97c60a65&amp;id=2852C4BB97C60A65%21339" href="https://skydrive.live.com/?cid=2852c4bb97c60a65&amp;id=2852C4BB97C60A65%21339">https://skydrive.live.com/?cid=2852c4bb97c60a65&amp;id=2852C4BB97C60A65%21339</a></p><p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/i0p2j12h0Os&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/i0p2j12h0Os&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>&nbsp;</p><p>Contact Information:</p><ul><li>Blog: <a title="http://raychambers.wordpress.com" href="http://raychambers.wordpress.com">http://raychambers.wordpress.com</a> </li><li>Twitter: <a href="https://twitter.com/#!/@Lanky_Boi_Ray" target="_blank">@Lanky_Boi_Ray</a> </li></ul> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/coding4fun/rss&WT.dl=0&WT.entryid=Entry:RSSView:93fccd99ed29425db7f29ffc00008195">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/kinect/Ray-Shouts-about-v1</comments>
      <link>http://channel9.msdn.com/coding4fun/kinect/Ray-Shouts-about-v1</link>
      <itunes:summary>Friend of the Gallery, Ray Chambers, has begun updating his many educational Kinect for Windows applications and tutorials to reflect the changes in the v1 SDK. In the coming weeks, I&#39;ll be dribbling out all his updates (if you can&#39;t wait you can also head over to his blog)Kinect SDK Full Release!–Shout Application!The Kinect SDK V1 for windows has had multiple changes made to it since the Beta 2. The whole tracking system has changed and it has been built together so that samples are easy to drag and drop in from the tool box.Biggest ChangesTracking: –You can play around with the settings much more and it feels easier to apply smoothing to your movement. Much of the jitter appears to be gone. Near Mode: – (ONLY ON WINDOWS KINECT) – Perhaps one of the most useful changes to the Kinect is that you can now start tracking things up to 40 CM close to the camera. I can see this being very useful for SEN students, however it is only available if you have the Windows Kinect. Variables: – The first thing which threw me off track was the amount of changes that have occurred. Many of the video tutorials which I have used showing you how to edit the elevation angle are no longer relevant. (runtime.NuiCamera.ElevationAngle != (int)slider1.Value) is now(kinectSensorChooser1.Kinect.ElevationAngle != (int)slider1.Value)Useful FactsIf you install V1 and try to download and run BETA 2 applications. They will not run. There have been too many changes and you will need to work through a lot of errors. If you are considering buying a Kinect for Windows device, please weigh up the options and consider what you will be using it for. If you want to use it on your Xbox and your Windows machine you will be disappointed. The Kinect for Windows device does not run on the Xbox 360. (I have tried this myself as I am lucky enough to have one of the new devices). Xbox 360 Kinect will run with the new SDK, however you will not be able to carry out near mode on it. There have been some changes in t</itunes:summary>
      <pubDate>Tue, 21 Feb 2012 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/kinect/Ray-Shouts-about-v1</guid>
      <dc:creator>Greg Duncan</dc:creator>
      <category>coding4fun</category>
      <category>kinect</category>
  </item>
  <item>
      <title>Need to find your local Windows Phone Champion? Here&#39;s an OData service, Phone app and source that will help</title>
      <description><![CDATA[<p>Today's Mobile Monday post is one that I thought could dispatch a number of birds with a single post...</p><ul><li>Show off a kind of cool OData data source </li><li>How to use your location and others to see how &quot;close&quot; you are </li><li>Help you find your local Windows Phone Champion </li><li>Give you an app, with source, that brings both of those together </li></ul><h2><a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/02/17/find-my-champ.aspx" target="_blank">Find My Champ</a></h2><blockquote><p>What do you think of when you hear the word “Champ”? Someone who is the best? A sports champion? How about someone who fights for a cause? Here at Microsoft we have employees called “Developer Evangelists”. Part of their job is to help get the word out about Microsoft products and technologies. The other part of their job is to champion our developers.</p><p>Here in Windows Phone we call our evangelists “Phone Champs”. Champs ensure our developers get exactly the help &amp; support they need and are the voice of the developer community. They are all experts on our platform and serve as local resources to answer questions from current or prospective developers. Champs can help you troubleshoot a problem in your app and can help you get your hands on a phone for testing. Oh, and some of our Champs are really funny and can tell you a good joke or two. <img src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2210.wlEmoticon_2D00_smile_5F00_4904DFAD.png" alt="Smile"></p><p>So how do you find one of our great Phone Champs? Today I’m happy to announce a new application to help you find them. We originally wanted to call the app “Champ Acquisition and Discovery 1.0 for Workgroups Windows Phone Edition.” Luckily cooler heads prevailed and we’re calling it “Find My Champ”.</p><p>...</p><p><strong>Get the App</strong></p><p>Go <a href="http://findmychamp.codeplex.com/">download the app’s source code</a>. Compile the code in our <a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=27570">dev tools</a> and side-load Find My Champ onto your developer device or into the emulator. The app will also be in the Marketplace soon for you to download. Find your local Phone Champ and get in touch with them. Ask them for help with your app or to let you know about events or hackathons in your area.</p><p>We’d love to get your feedback on the Find My Champ application. Tell us what we can do to make it more useful. You can also come help us improve the app on <a href="http://findmychamp.codeplex.com/">Codeplex</a>. Additionally, I suspect that many of you will have creative ideas for how to use the <a href="http://champ.cloudapp.net/ChampDataService.svc">Champs OData feed</a> in other applications, mashups, etc. Please let me know what you create!</p></blockquote><p>The first thing that I thought was cool was that this is backed on an <a href="http://champ.cloudapp.net/ChampDataService.svc">OData feed</a>. This means that if we, the development community want to present our own view of the data, in our own apps, we can very easily.</p><p>Using the <a href="http://champ.cloudapp.net/ChampDataService.svc">OData feed</a> is very easy. Here's a snap from the must have <a href="http://www.linqpad.net/" target="_blank">LINQPad</a> utility querying the feed.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML13e2501a%5B3%5D.png" target="_blank"><img title="SNAGHTML13e2501a" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML13e2501a_thumb.png" alt="SNAGHTML13e2501a" width="650" height="283" border="0"></a></p><p>LINQPad makes it almost too easy to play with this feed. Say I want all the Champs with a Last Name starting with E, order by LastName?</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B2%5D-35.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb-34.png" alt="image" width="650" height="327" border="0"></a></p><p>Or who have a MSDN blog and also have a Twitter account?</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B5%5D-15.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B1%5D-43.png" alt="image" width="650" height="398" border="0"></a></p><p>Okay, OData via Linq is cool, but what if you want the actual OData URL for this query? Again, LINQPad makes that click easy. Just click on the &quot;SQL&quot; right above the results;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B11%5D-17.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B3%5D-29.png" alt="image" width="650" height="169" border="0"></a></p><p>Then to maybe finally blow your mind, did you know Notepad can open URL's?</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B14%5D-14.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B4%5D-29.png" alt="image" width="650" height="389" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML13ec4a22%5B3%5D.png" target="_blank"><img title="SNAGHTML13ec4a22" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML13ec4a22_thumb.png" alt="SNAGHTML13ec4a22" width="650" height="295" border="0"></a></p><p>So we're got the data, lets check out the <a href="http://findmychamp.codeplex.com/SourceControl/list/changesets" target="_blank">app source</a>.</p><p>First, when you download the source, you'll need to add one reference, easily done via NuGet.</p><p>When you first open the Solution you'll see this (if you expand the given items). Note the warning/missing icons;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B18%5D-7.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B6%5D-21.png" alt="image" width="204" height="427" border="0"></a></p><p>Fire up NuGet and search for &quot;SilverlightToolkitWP&quot;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML13eefd5a%5B3%5D.png" target="_blank"><img title="SNAGHTML13eefd5a" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML13eefd5a_thumb.png" alt="SNAGHTML13eefd5a" width="610" height="407" border="0"></a></p><p>Click install.</p><p>That's it. You should now be good to go and able to run the app in the Emulator.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B21%5D-7.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B7%5D-19.png" alt="image" width="244" height="407" border="0"></a><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B27%5D-3.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B9%5D-14.png" alt="image" width="244" height="407" border="0"></a><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B24%5D-5.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B8%5D-15.png" alt="image" width="244" height="407" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B39%5D-1.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B13%5D-5.png" alt="image" width="244" height="407" border="0"></a><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B42%5D-2.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B14%5D-1.png" alt="image" width="244" height="407" border="0"></a></p><p>When first running the app in the Emulator, the Local list will be this default list. If you want to see the local people for a given location, set the location and then re-run the app (refresh doesn't yet seem to take a change in location into account).</p><p>So here I set the location;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B33%5D-1.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B11%5D-8.png" alt="image" width="463" height="407" border="0"></a></p><p>Then exit and re-run the app in the Emulator.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B30%5D-3.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B10%5D-6.png" alt="image" width="650" height="364" border="0"></a></p><p>Set to another location, exit and rerun the app. You don't need to kill the emulator or debugging session, just re-run it in the emulator (if that makes sense?)</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B36%5D.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B12%5D-4.png" alt="image" width="650" height="362" border="0"></a></p><p>The source is pretty easily readable and spelunkable;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B49%5D.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B17%5D-2.png" alt="image" width="220" height="427" border="0"></a></p><p>Data binding is used as you would expect.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML13fb2831%5B3%5D.png" target="_blank"><img title="SNAGHTML13fb2831" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML13fb2831_thumb.png" alt="SNAGHTML13fb2831" width="650" height="360" border="0"></a></p><p>One of the things I thought key was how &quot;local&quot; was determined. How was your location and the Champ's Lat/Long's used to determine &quot;local?&quot;</p><p><pre class="brush: csharp">public static double GetDistance(double fromLatitude, double fromLongitude, double toLatitude, double toLongitude)
{

     int earthRadius = 6371;         // earth's radius (mean) in km
     double chgLat = DegreeToRadians(toLatitude - fromLatitude);
     double chgLong = DegreeToRadians(toLongitude - fromLongitude);
     double a = Math.Sin(chgLat / 2) * Math.Sin(chgLat / 2) &#43; Math.Cos(DegreeToRadians(fromLatitude)) * Math.Cos(DegreeToRadians(toLatitude)) * Math.Sin(chgLong / 2) * Math.Sin(chgLong / 2);
     double c = 2 * Math.Atan2(Math.Sqrt(a), Math.Sqrt(1 - a));

     double d = earthRadius * c;

     return d;
}

private static double DegreeToRadians(double value)
{
     return Math.PI * value / 180.0;
}
</pre></p><p><pre class="brush: csharp">private void UpdateDistance()
{
    if (GeoData.Status != GeoPositionStatus.Ready)
        return;
    // when position is updated, update distance
    var _FromLat = GeoData.Location.Latitude;
    var _FromLong = GeoData.Location.Longitude;
    var _ToLat = (double)Latitude;
    var _ToLong = (double)Longitude;
    this.DistanceAway = FMCLocation.GetDistance(_FromLat, _FromLong, _ToLat, _ToLong);
}


// this is the same as PropertyChanged(&quot;Distance&quot;), just easier to use
public event EventHandler DistanceChanged;

private double m_DistanceAway;
public double DistanceAway
{
    get { return m_DistanceAway; }
    set
    {
        m_DistanceAway = value;
        OnPropertyChanged(&quot;DistanceAway&quot;);
        OnPropertyChanged(&quot;IsLocal&quot;);
        if (DistanceChanged != null)
            DistanceChanged(this, EventArgs.Empty);
    }
}

public bool IsLocal { get { return (DistanceAway &gt; 0 &amp;&amp; DistanceAway &lt; 250); } }

</pre></p><p>If you're looking for help in building your Windows Phone 7 applications and are looking for help, think about contacting your local Champ. That's part of their job and desire, to be there to help you. Finding them, is now super easy, via this app (which you have to agree is kind of meta-cool... <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/coding4fun/rss&WT.dl=0&WT.entryid=Entry:RSSView:1fe6e819b562467c92ea9ffb01654359">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Need-to-find-your-local-Windows-Phone-Champion-Heres-an-OData-service-Phone-app-and-source-that-will</comments>
      <link>http://channel9.msdn.com/coding4fun/blog/Need-to-find-your-local-Windows-Phone-Champion-Heres-an-OData-service-Phone-app-and-source-that-will</link>
      <itunes:summary>Today&#39;s Mobile Monday post is one that I thought could dispatch a number of birds with a single post...Show off a kind of cool OData data source How to use your location and others to see how &amp;quot;close&amp;quot; you are Help you find your local Windows Phone Champion Give you an app, with source, that brings both of those together Find My ChampWhat do you think of when you hear the word “Champ”? Someone who is the best? A sports champion? How about someone who fights for a cause? Here at Microsoft we have employees called “Developer Evangelists”. Part of their job is to help get the word out about Microsoft products and technologies. The other part of their job is to champion our developers.Here in Windows Phone we call our evangelists “Phone Champs”. Champs ensure our developers get exactly the help &amp;amp; support they need and are the voice of the developer community. They are all experts on our platform and serve as local resources to answer questions from current or prospective developers. Champs can help you troubleshoot a problem in your app and can help you get your hands on a phone for testing. Oh, and some of our Champs are really funny and can tell you a good joke or two. So how do you find one of our great Phone Champs? Today I’m happy to announce a new application to help you find them. We originally wanted to call the app “Champ Acquisition and Discovery 1.0 for Workgroups Windows Phone Edition.” Luckily cooler heads prevailed and we’re calling it “Find My Champ”....Get the AppGo download the app’s source code. Compile the code in our dev tools and side-load Find My Champ onto your developer device or into the emulator. The app will also be in the Marketplace soon for you to download. Find your local Phone Champ and get in touch with them. Ask them for help with your app or to let you know about events or hackathons in your area.We’d love to get your feedback on the Find My Champ application. Tell us what we can do to make it more useful. You can also come</itunes:summary>
      <pubDate>Mon, 20 Feb 2012 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Need-to-find-your-local-Windows-Phone-Champion-Heres-an-OData-service-Phone-app-and-source-that-will</guid>
      <dc:creator>Greg Duncan</dc:creator>
      <category>coding4fun</category>
      <category>odata</category>
      <category>windows-phone-7</category>
  </item>
  <item>
      <title>Changing Kinect Audio Level gain to improve speech recognition</title>
      <description><![CDATA[<p>The primary theme for this week, like the last few, and probably the next few, is &quot;v1&quot;. Projects, information, details, updates, etc related to the Kinect for Windows Sensor and SDK v1 release.</p><p>Today is some information about default audio levels and how they might not be best for voice recognition (and how to fix that in your code)</p><h2>Workaround for Kinect for Windows sub-optimal audio gain setting</h2><blockquote><p>The first version of Kinect for Windows SDK shipped with a default microphone gain setting that is known to be sub-optimal for speech recognition scenarios. This was addressed in the <a href="http://www.microsoft.com/en-us/kinectforwindows/develop/release-notes.aspx">version's release notes</a>, under &quot;Known Issues&quot; section, issue titled &quot;Microphone Array default gain setting is sub-optimal&quot;.</p><p>The release notes give instructions to work around issue as a user, through manual steps, but since developers probably want to do this programmatically I'm attaching sample code to this post that shows how to configure this setting automatically.</p><p>Compiling the sample will build a console application that can be called as follows:</p><ol><li>KinectAudioLevel </li><li>KinectAudioLevel 0 </li><li>KinectAudioLevel 10 </li><li>KinectAudioLevel 30 </li></ol><p>Command lines 1 and 2 will set gain on Kinect microphone to 0 dB (i.e.: no gain), which is the optimal setting for speech recognition. Command line 3 will set gain to 10dB, and command line 4 will set gain to 30dB, which is the maximum and corresponds to 100% in sound control panel.</p><p>We're working on improving the default settings in future releases, <strong>but for now speech recognition applications will get better results by explicitly setting default gain to 0dB, and applications that record audio should experiment with a gain setting that works best for them. [GD: Emphasis added]</strong></p></blockquote><p><strong>Project Information URL:</strong> <a title="http://blogs.msdn.com/b/eddys_code/archive/2012/02/10/workaround-for-kinect-for-windows-sub-optimal-audio-gain-setting.aspx" href="http://blogs.msdn.com/b/eddys_code/archive/2012/02/10/workaround-for-kinect-for-windows-sub-optimal-audio-gain-setting.aspx">http://blogs.msdn.com/b/eddys_code/archive/2012/02/10/workaround-for-kinect-for-windows-sub-optimal-audio-gain-setting.aspx</a></p><p><strong>Project Download URL:</strong> <a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-26-67-61/KinectAudioLevel.zip">http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-26-67-61/KinectAudioLevel.zip</a></p><p>Contact Information:</p><ul><li>Blog: <a title="http://blogs.msdn.com/b/eddys_code" href="http://blogs.msdn.com/b/eddys_code">http://blogs.msdn.com/b/eddys_code</a> </li></ul><p>&nbsp;</p><p>Page Image, <a href="http://www.flickr.com/photos/x-ray_delta_one/3981617434/" target="_blank">dual-head-mounted-listening-device</a>, courtesy of <a href="http://www.flickr.com/photos/x-ray_delta_one/">x-ray delta one</a></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/coding4fun/rss&WT.dl=0&WT.entryid=Entry:RSSView:f9d73fa5f19048018ee79ffb01878dbe">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/kinect/Changing-Kinect-Audio-Level-gain-to-improve-speech-recognition</comments>
      <link>http://channel9.msdn.com/coding4fun/kinect/Changing-Kinect-Audio-Level-gain-to-improve-speech-recognition</link>
      <itunes:summary>The primary theme for this week, like the last few, and probably the next few, is &amp;quot;v1&amp;quot;. Projects, information, details, updates, etc related to the Kinect for Windows Sensor and SDK v1 release.Today is some information about default audio levels and how they might not be best for voice recognition (and how to fix that in your code)Workaround for Kinect for Windows sub-optimal audio gain settingThe first version of Kinect for Windows SDK shipped with a default microphone gain setting that is known to be sub-optimal for speech recognition scenarios. This was addressed in the version&#39;s release notes, under &amp;quot;Known Issues&amp;quot; section, issue titled &amp;quot;Microphone Array default gain setting is sub-optimal&amp;quot;.The release notes give instructions to work around issue as a user, through manual steps, but since developers probably want to do this programmatically I&#39;m attaching sample code to this post that shows how to configure this setting automatically.Compiling the sample will build a console application that can be called as follows:KinectAudioLevel KinectAudioLevel 0 KinectAudioLevel 10 KinectAudioLevel 30 Command lines 1 and 2 will set gain on Kinect microphone to 0 dB (i.e.: no gain), which is the optimal setting for speech recognition. Command line 3 will set gain to 10dB, and command line 4 will set gain to 30dB, which is the maximum and corresponds to 100% in sound control panel.We&#39;re working on improving the default settings in future releases, but for now speech recognition applications will get better results by explicitly setting default gain to 0dB, and applications that record audio should experiment with a gain setting that works best for them. [GD: Emphasis added]Project Information URL: http://blogs.msdn.com/b/eddys_code/archive/2012/02/10/workaround-for-kinect-for-windows-sub-optimal-audio-gain-setting.aspxProject Download URL: http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-26-67-61/KinectAud</itunes:summary>
      <pubDate>Mon, 20 Feb 2012 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/kinect/Changing-Kinect-Audio-Level-gain-to-improve-speech-recognition</guid>
      <dc:creator>Greg Duncan</dc:creator>
      <category>coding4fun</category>
      <category>kinect</category>
  </item>
  <item>
      <title>Arduino, The Documentary</title>
      <description><![CDATA[<p>Today's Hardware Friday post doesn't have specific hardware, no code, nothing to directly build... Oh no!</p><p>But it was something that when I saw it on <a href="http://10rem.net/" target="_blank">Pete Brown's site</a>, I knew I had to share with you. Hopefully you'll find this 30 minute video as interesting as I did...</p><h2><a href="http://10rem.net/blog/2012/01/24/arduino-the-documentary" target="_blank">Arduino The Documentary</a></h2><blockquote><p>For anyone interested in open source microcontroller development, or why boards are named with *duino type names, this 1/2 hour documentary is a great watch.</p><p>Arduino.TheDocumentary.2010.English explains the origin of the Arduino in a relatively non-technical interview-based documentary style, with interviews for people involved in the creation, as well as key partners and users.</p><p>Spanish version is also available</p></blockquote><p><object width="400" height="220"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=18539129&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=18539129&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="220"></embed></object><p><a href="http://vimeo.com/18539129">from Vimeo</a>.</p></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/coding4fun/rss&WT.dl=0&WT.entryid=Entry:RSSView:163a26190d1342b6b4c49ff401426aad">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Arduino-The-Documentary</comments>
      <link>http://channel9.msdn.com/coding4fun/blog/Arduino-The-Documentary</link>
      <itunes:summary>Today&#39;s Hardware Friday post doesn&#39;t have specific hardware, no code, nothing to directly build... Oh no!But it was something that when I saw it on Pete Brown&#39;s site, I knew I had to share with you. Hopefully you&#39;ll find this 30 minute video as interesting as I did...Arduino The DocumentaryFor anyone interested in open source microcontroller development, or why boards are named with *duino type names, this 1/2 hour documentary is a great watch.Arduino.TheDocumentary.2010.English explains the origin of the Arduino in a relatively non-technical interview-based documentary style, with interviews for people involved in the creation, as well as key partners and users.Spanish version is also availablefrom Vimeo.</itunes:summary>
      <pubDate>Fri, 17 Feb 2012 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Arduino-The-Documentary</guid>
      <dc:creator>Greg Duncan</dc:creator>
      <category>coding4fun</category>
  </item>
  <item>
      <title>Let your apps sell themselves!</title>
      <description><![CDATA[<p>Don't miss any opportunity to market your Windows Phone apps!&nbsp; Each one of your apps can serve as an ad for your other apps.&nbsp;&nbsp;&nbsp; Learn how to add a listing of everything you have published in Marketplace to each of your apps.&nbsp; Even better, it will always be up to date!</p><h3>Introduction</h3><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B2%5D-2.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb-2.png" alt="image" width="244" height="189" align="left" border="0"></a>I've written a number of Windows Phone apps, and each time I've wanted to let people know about my other apps.&nbsp; While I could mention the other apps somewhere, I wouldn't want to update all of my apps each time I release a new one.&nbsp; It finally occurred to me that I could use the listing of apps directly from Marketplace instead.&nbsp; This provides me with an easy-to-parse XML feed (Atom) of my apps with all of the info that I need.&nbsp; Armed with that, it wasn't too much work to create a user control to let me drop in the list of apps anytime I need it.</p><p>This code doesn't require a physical phone, but it isn't very useful if you don't have a Marketplace account!&nbsp; Ideally, you should have several published apps under your account for this to make much sense.&nbsp; Once you have it in place though, all of your apps will always show your complete list without any special updates.</p><p>If you don't have the software installed, go to <a href="http://create.msdn.com/">create.msdn.com</a>, then click <strong>Download the free tools </strong>to download the Windows Phone Developer Tools (or use the direct download link provided above this Introduction section). This code is written for the Windows Phone Developer Tools 7.1 (Mango).&nbsp; It’s is a mostly online install, and it’s pretty big so expect it to take some time. Even if you don’t have any development tools, this will give you Visual Studio Express, Blend, and XNA Game Studio. If you have the full-version tools already, it will add new templates.</p><h3>Project Basics</h3><p>The intention is to create a user control to display a list of apps from a given publisher (preferably yourself!).&nbsp; This user control will be implemented as a ListBox with individual apps showing up visually similar to the way they do in Marketplace.&nbsp; Touching an app in the list should bring the user directly to the appropriate Marketplace page.&nbsp; It should be as easy as adding a project reference, adding the control to a XAML page, and setting the publisher (this could potentially be set by reading the WMAppManifest.xml file).</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/MyAppsList7.png"><img title="MyAppsList" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/MyAppsList_thumb3.png" alt="MyAppsList" width="465" height="772" border="0"></a></p><h3>Marketplace Data</h3><p>At first glance, getting Marketplace data programmatically isn't an option.&nbsp; Sadly, there's no API for this.&nbsp; Fortunately, there's a solution!&nbsp; If you're using the Zune app to browse publishers and apps, you can watch the network traffic using Fiddler (<a href="http://fiddler2.com/fiddler2/">http://fiddler2.com/fiddler2/</a>).&nbsp; What's nice is that everything you do in Zune results in a simple HTTP request for the data, which is returned as an XML stream.&nbsp; A simple WebRequest object can do a DownloadStringAsync call to get the data, then the SyndicationFeed class can load and parse it.&nbsp; There are extension elements for rating, release date, and price.&nbsp; Even nicer, is that the image thumbnail can be resized server-side based on the URL query string.&nbsp; This makes it super easy to get exactly what we need.</p><p>The server of interest is catalog.zune.net, and the URL format is:</p><p>&nbsp;</p><pre class="csharpcode"><pre class="brush: text">/v3.2/en-US/apps?q=PublisherName&amp;clientType=WinMobile 7.1&amp;store=zest</pre></pre><p>The &quot;q&quot; parameter just needs to be set to the publisher name of interest.&nbsp; Remember to URL encode yours if you have spaces in it.</p><p>Note the &quot;clientType&quot; parameter.&nbsp; If you change it to WinMobile 7.0 you will get NoDo (pre-Mango) apps only.&nbsp; You may or may not have anything show up for that, but it's not likely you'll want that list.</p><p>The &quot;store&quot; parameter is set to &quot;zest&quot; but we'll just have to take this one on faith!&nbsp; I'm not aware of any other options here.&nbsp; This could vary by country, but I don't have any data on that.</p><p>This will return all apps for Mango.&nbsp; This returns feed information starting with a header:</p><p>&nbsp;</p><pre class="csharpcode"><pre class="brush: xml">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;a:feed xmlns:a=&quot;http://www.w3.org/2005/Atom&quot; xmlns:os=http://a9.com/-/spec/opensearch/1.1/ 
 xmlns=&quot;http://schemas.zune.net/catalog/apps/2008/02&quot;&gt;
  &lt;a:link rel=&quot;self&quot; type=&quot;application/atom&#43;xml&quot; 
    href=&quot;/v3.2/en-US/apps?q=Arian&#43;T.&#43;Kulp&amp;amp;store=zest&amp;amp;clientType=WinMobile&#43;7.1&quot; /&gt;
  &lt;os:startIndex&gt;1&lt;/os:startIndex&gt;
  &lt;os:totalResults&gt;5&lt;/os:totalResults&gt;
  &lt;os:itemsPerPage&gt;5&lt;/os:itemsPerPage&gt;
  &lt;a:updated&gt;2012-01-30T04:21:41.9702941Z&lt;/a:updated&gt;
  &lt;a:title type=&quot;text&quot;&gt;List Of Items&lt;/a:title&gt;
  &lt;a:id&gt;tag:catalog.zune.net,2012-01-30:/apps&lt;/a:id&gt;</pre></pre><p>&nbsp;</p><p>You can pretty much ignore this section.&nbsp; The important stuff comes next!&nbsp; Each Atom entry is one app, along with every bit of metadata that you need to make an interesting view:</p><p>&nbsp;</p><pre class="csharpcode">  <pre class="brush: xml">&lt;a:entry&gt;
    &lt;a:updated&gt;2012-01-30T04:21:41.9858942Z&lt;/a:updated&gt;
    &lt;a:title type=&quot;text&quot;&gt;Metro Lockscreen Creator&lt;/a:title&gt;
    &lt;a:id&gt;urn:uuid:0f5eaaa8-e75e-4a04-a5f9-24db1c176a6b&lt;/a:id&gt;
    &lt;sortTitle&gt;Metro Lockscreen Creator&lt;/sortTitle&gt;
    &lt;releaseDate&gt;2011-07-26T14:30:39.987Z&lt;/releaseDate&gt;
    &lt;version&gt;1.3.0.0&lt;/version&gt;
    &lt;averageUserRating&gt;7.254902&lt;/averageUserRating&gt;
    &lt;userRatingCount&gt;51&lt;/userRatingCount&gt;
    &lt;averageLastInstanceUserRating&gt;5.2&lt;/averageLastInstanceUserRating&gt;
    &lt;lastInstanceUserRatingCount&gt;5&lt;/lastInstanceUserRatingCount&gt;
    &lt;image&gt;
      &lt;id&gt;urn:uuid:cb46389d-6d50-4be0-b4ff-75c968f301ea&lt;/id&gt;
    &lt;/image&gt;
    &lt;categories&gt;
      &lt;category&gt;
        &lt;id&gt;windowsphone.toolsandproductivity&lt;/id&gt;
        &lt;title&gt;tools &#43; productivity&lt;/title&gt;
        &lt;isRoot&gt;True&lt;/isRoot&gt;
      &lt;/category&gt;
    &lt;/categories&gt;
    &lt;tags&gt;
      &lt;tag&gt;apptag.independent&lt;/tag&gt;
    &lt;/tags&gt;
    &lt;offers&gt;
      &lt;offer&gt;
        &lt;offerId&gt;urn:uuid:b8d5cc60-0839-4bcb-b26e-e85ba3e92c8d&lt;/offerId&gt;
        &lt;mediaInstanceId&gt;urn:uuid:2ff871ea-cf8a-488e-b613-286052b90a13&lt;/mediaInstanceId&gt;
        &lt;clientTypes&gt;
          &lt;clientType&gt;WinMobile 7.1&lt;/clientType&gt;
        &lt;/clientTypes&gt;
        &lt;paymentTypes&gt;
          &lt;paymentType&gt;Credit Card&lt;/paymentType&gt;
          &lt;paymentType&gt;Mobile Operator&lt;/paymentType&gt;
        &lt;/paymentTypes&gt;
        &lt;store&gt;Zest&lt;/store&gt;
        &lt;price&gt;0&lt;/price&gt;
        &lt;displayPrice&gt;$0.00&lt;/displayPrice&gt;
        &lt;priceCurrencyCode&gt;USD&lt;/priceCurrencyCode&gt;
        &lt;licenseRight&gt;Purchase&lt;/licenseRight&gt;
      &lt;/offer&gt;
    &lt;/offers&gt;
    &lt;publisher&gt;
      &lt;id&gt;Arian T. Kulp&lt;/id&gt;
      &lt;name&gt;Arian T. Kulp&lt;/name&gt;
    &lt;/publisher&gt;
  &lt;/a:entry&gt;</pre></pre><p>From this block you can get title, release date, rating average and count, category, image ID (easily converted to URL), and price (per market).&nbsp; The <strong>System.ServiceModel.Syndication.SyndicationFeed</strong> class can read from an <strong>XMLReader </strong>object and it handles everything for you.&nbsp; Dealing with the custom Marketplace namespace can lead to some slight complication, but fortunately that's simplified as well.</p><h3>Syndicated Data</h3><p>For standard Atom elements (the ones with the a: namespace here), you can use properties of the <strong>SyndicationItem</strong> class.&nbsp; For some reason, the <strong>SyndicationItem </strong>class isn't actually available in the Windows Phone libraries.&nbsp; I'm not sure why this is the case, but it turns out that you can use the desktop version without a problem.&nbsp; Just add a reference to the &quot;C:\Program Files (x86)\Microsoft SDKs\Silverlight\v3.0\Libraries\Client\System.ServiceModel.Syndication&quot; assembly.&nbsp; You might get a warning when you add it, but it will work fine.&nbsp; If you download the accompanying code, you'll get all the assemblies you need in it.</p><p>The <strong>SyndicationItem </strong>class gets you properties like <em>Title</em> and <em>Id</em>.&nbsp; The other properties are all custom types in the &quot;http://schemas.zune.net/catalog/apps/2008/02&quot; namespace.&nbsp; From these properties, you are interested in <em>shortDescription</em>, <em>userRatingCount</em>, <em>averageUserRating</em>, <em>version</em>, <em>releaseDate</em>, <em>displayPrice</em>, and <em>priceCurrencyCode</em>.&nbsp; Instead of worrying about namespaces, since you know they are custom elements, you can use the <em>ElementExtensions</em> collection on the <strong>SyndicationItem</strong> and query the <em>OuterName</em> property.&nbsp; A simple extension method makes this easy:</p><p><strong>Visual Basic</strong></p><p>&nbsp;</p><pre class="csharpcode"><pre class="brush: vb">Private Shared Function GetExtensionElementValue(Of T)(item As SyndicationItem, extensionElementName As String) As T
  Dim f = (From ee In item.ElementExtensions Where ee.OuterName = extensionElementName).FirstOrDefault()

  Return If(f Is Nothing, Nothing, f.GetObject(Of T)())
End Function</pre></pre><p><strong>Visual C#</strong></p><pre class="csharpcode"><pre class="brush: csharp">private static T GetExtensionElementValue&lt;T&gt;(SyndicationItem item, string extensionElementName)
{
    var f = item.ElementExtensions.Where(ee =&gt; ee.OuterName == extensionElementName).FirstOrDefault();
    return f == null ? default(T) : f.GetObject&lt;T&gt;();
}</pre></pre><p>With this method in place, you can create most of a new MarketplaceApp object with the following code:</p><p><strong>Visual Basic</strong></p><p>&nbsp;</p><pre class="csharpcode"><pre class="brush: vb">Dim app = New MarketplaceApp() With { _
    .Id = id, _
    .AppLink = &quot;http://windowsphone.com/s?appid=&quot; &amp; Convert.ToString(id), _
    .Title = item.Title.Text, _
    .ShortDescription = GetExtensionElementValue(Of String)(item, &quot;shortDescription&quot;), _
    .UserRatingCount = GetExtensionElementValue(Of Integer)(item, &quot;userRatingCount&quot;), _
    .Version = GetExtensionElementValue(Of String)(item, &quot;version&quot;), _
    .AverageUserRating = GetExtensionElementValue(Of Double)(item, &quot;averageUserRating&quot;) / 2.0, _
    .ReleaseDate = GetExtensionElementValue(Of String)(item, &quot;releaseDate&quot;), _
    .PrimaryImageUrl = Root &amp; &quot;/v3.2/en-US/apps/&quot; &amp; Convert.ToString(id) &amp; &quot;/primaryImage?width=95&amp;height=95&amp;resize=true&quot;, _
    .DisplayPrice = &quot;Unknown&quot; _
}</pre></pre><p><strong>Visual C#</strong></p><pre class="csharpcode"><pre class="brush: csharp">var app = new MarketplaceApp
{
    Id = id,
    AppLink = &quot;http://windowsphone.com/s?appid=&quot; &#43; id,
    Title = item.Title.Text,
    ShortDescription = GetExtensionElementValue&lt;string&gt;(item, &quot;shortDescription&quot;),
    UserRatingCount = GetExtensionElementValue&lt;int&gt;(item, &quot;userRatingCount&quot;),
    Version = GetExtensionElementValue&lt;string&gt;(item, &quot;version&quot;),
    AverageUserRating = GetExtensionElementValue&lt;double&gt;(item, &quot;averageUserRating&quot;) / 2.0,
    ReleaseDate = GetExtensionElementValue&lt;string&gt;(item, &quot;releaseDate&quot;),
    PrimaryImageUrl = Root &#43; &quot;/v3.2/en-US/apps/&quot; &#43; id &#43; &quot;/primaryImage?width=95&amp;height=95&amp;resize=true&quot;
};</pre></pre><p>Where it gets a little bit tricky is the &quot;offers&quot; block.&nbsp; This is an XML block within the overall <em>Item</em> block.&nbsp; This requires that you shift over to an <strong>XmlReader </strong>method of parsing.&nbsp; This works by reading the XML sequentially, stopping at elements of interest.&nbsp; You start by finding the &quot;offers&quot; element, but instead of using the <em>GetObject</em> method, you use <em>GetReader</em>.&nbsp; From there, you use a <em>while</em> loop to visit every node, and grab the value if it's of <em>XmlNodeType.Element</em> and either <em>displayPrice</em> or <em>priceCurrencyCode</em>.</p><p><strong>Visual Basic</strong></p><p>&nbsp;</p><pre class="csharpcode"><pre class="brush: vb">Dim offers = (From ee In item.ElementExtensions Where ee.OuterName = &quot;offers&quot;).FirstOrDefault().GetReader()

' TODO: Restrict to current country's offer
If offers.ReadToFollowing(&quot;offer&quot;) Then
    While offers.Read()
        If offers.NodeType = XmlNodeType.Element Then
            If offers.Name = &quot;displayPrice&quot; Then
                app.DisplayPrice = offers.ReadElementContentAsString()
            ElseIf offers.Name = &quot;priceCurrencyCode&quot; Then
                app.PriceCurrencyCode = offers.ReadElementContentAsString()
            End If
        End If
    End While
End If</pre></pre><p><strong>Visual C#</strong></p><pre class="csharpcode"><pre class="brush: csharp">var offers = item.ElementExtensions.
    Where(ee =&gt; ee.OuterName == &quot;offers&quot;).FirstOrDefault().GetReader();

// TODO: Restrict to current country's offer
if (offers.ReadToFollowing(&quot;offer&quot;))
{
    while(offers.Read())
    {
        if (offers.NodeType == XmlNodeType.Element)
        {
            if (offers.Name == &quot;displayPrice&quot;)
                app.DisplayPrice = offers.ReadElementContentAsString();
            else if (offers.Name == &quot;priceCurrencyCode&quot;)
                app.PriceCurrencyCode = offers.ReadElementContentAsString();
        }
    }
}</pre></pre><p>Notice the &quot;TODO&quot; block.&nbsp; If you are offering your app for sale at different prices in different markets, this will only grab the first offer.&nbsp; Ideally, this should grab the offer for the user's location, but that's another topic!</p><h3>Creating the Control</h3><p>Creating a user control makes it easy to add your list of apps anywhere.&nbsp; I like to add it to a PivotItem in my About page.&nbsp; There are really three things to do:</p><p>&nbsp;</p><ol><li>Download the XML </li><li>Parse the XML into model objects </li><li>Bind the collection of items to a list </li></ol><p>Of course, before you can show anything, you'll want to create a template to serve as the ItemTemplate in the control.&nbsp; This will use databinding to point back at the properties of the marketplace entries to display the name, price, image, etc.&nbsp; This can be created inline within the ListBox markup, or in the UserControl.Resources block (as it is in this case).&nbsp; The root element is a Grid.&nbsp; The Image shows the app's icon, and the StackPanel displays the title, price, and rating information.</p><pre class="csharpcode"><pre class="brush: xml">&lt;DataTemplate x:Key=&quot;AppTemplate&quot;&gt;
    &lt;Grid x:Name=&quot;LayoutRoot&quot; Margin=&quot;0,0,0,4&quot; Width=&quot;450&quot; Background=&quot;Transparent&quot;&gt;
        &lt;Grid.ColumnDefinitions&gt;
            &lt;ColumnDefinition Width=&quot;95&quot;/&gt;
            &lt;ColumnDefinition Width=&quot;1*&quot; /&gt;
        &lt;/Grid.ColumnDefinitions&gt;

        &lt;Image Source=&quot;{Binding PrimaryImageUrl}&quot; Margin=&quot;0,0,20,10&quot; /&gt;
        &lt;StackPanel Grid.Column=&quot;1&quot;&gt;
            &lt;TextBlock Text=&quot;{Binding Title}&quot; /&gt;
            &lt;Controls1:RatingControl Max=&quot;5&quot; Total=&quot;{Binding UserRatingCount}&quot;
Score=&quot;{Binding AverageUserRating}&quot; /&gt;
            &lt;TextBlock Text=&quot;{Binding DisplayPrice}&quot; /&gt;
        &lt;/StackPanel&gt;
    &lt;/Grid&gt;
&lt;/DataTemplate&gt;</pre></pre><p>With the template complete, you just need a ListBox with the ItemTemplate set to the above template.&nbsp;</p><pre class="csharpcode"><pre class="brush: xml">&lt;Grid&gt;
    &lt;ListBox x:Name=&quot;listBox&quot; ItemsSource=&quot;{Binding Apps}&quot;
ItemTemplate=&quot;{StaticResource AppTemplate}&quot;SelectionChanged=&quot;ListBox_SelectionChanged&quot; /&gt;
    &lt;StackPanel x:Name=&quot;LoadingView&quot; HorizontalAlignment=&quot;Center&quot;
VerticalAlignment=&quot;Center&quot;Visibility=&quot;Collapsed&quot;&gt;
        &lt;TextBlock TextWrapping=&quot;Wrap&quot; Text=&quot;Loading list of apps...&quot;
d:LayoutOverrides=&quot;Height&quot;FontWeight=&quot;Black&quot;/&gt;
        &lt;ProgressBar Margin=&quot;0,0,0,6&quot; Height=&quot;5&quot; IsIndeterminate=&quot;True&quot;/&gt;
    &lt;/StackPanel&gt;
    &lt;StackPanel x:Name=&quot;ErrorView&quot; Orientation=&quot;Vertical&quot; VerticalAlignment=&quot;Center&quot;
HorizontalAlignment=&quot;Center&quot; Visibility=&quot;Collapsed&quot;&gt;
        &lt;TextBlock HorizontalAlignment=&quot;Left&quot; TextWrapping=&quot;Wrap&quot;
Text=&quot;Sorry, there was an error reading the list of apps.&quot; FontStyle=&quot;Italic&quot;/&gt;
    &lt;/StackPanel&gt;
&lt;/Grid&gt;</pre></pre><p>The other elements are used to display a loading message and an error message.&nbsp; Switching between the list, loading, or error message is accomplished using VisualStateManager with the &quot;Normal,&quot; &quot;Loading,&quot; or &quot;Error&quot; states accordingly.</p><p>The only other methods needed in the code-behind are to handle selection and caching.&nbsp; When an item is selected, you create a <strong>MarketplaceDetailTask </strong>object, set the <em>ContentIdentifier</em> to the app's unique ID, and call Show().&nbsp; Set the <em>SelectedIndex</em> property back to -1 to prevent a problem where a user can't press the same item twice in the row.</p><p>The caching is important so the app doesn't cause data access on every single visit to the control.&nbsp; It's currently set to reload once per day, but this could be changed (or better yet, made configurable).&nbsp; Even if it's more than a day, if there's an error downloading the data it will always fallback to cache.</p><p><strong>Visual Basic</strong></p><p>&nbsp;</p><pre class="csharpcode"><pre class="brush: vb">Dim items As IEnumerable(Of MarketplaceApp) = Nothing

If IsolatedStorageSettings.ApplicationSettings.Contains(&quot;PublisherAppsControls.Items&quot;) Then
  items = DirectCast(IsolatedStorageSettings.ApplicationSettings( _
    &quot;PublisherAppsControls.Items&quot;), IEnumerable(Of MarketplaceApp)) 
  ' Use the cache if within a day...
  Dim dt = CType(IsolatedStorageSettings.ApplicationSettings( _ 
    &quot;PublisherAppsControls.Items.DateTime&quot;), DateTime)

  If DateTime.Now.Subtract(dt).TotalDays &lt; 1 Then
    ctrl.Apps.Clear()
    For Each i In items
      ctrl.Apps.Add(i)
    Next
    Return
  End If
End If</pre></pre><p><strong>Visual C#</strong></p><pre class="csharpcode"><pre class="brush: csharp">IEnumerable&lt;MarketplaceApp&gt; items = null;

if (IsolatedStorageSettings.ApplicationSettings.Contains(&quot;PublisherAppsControls.Items&quot;))
{
    items = (IEnumerable&lt;MarketplaceApp&gt;)
             IsolatedStorageSettings.ApplicationSettings[&quot;PublisherAppsControls.Items&quot;];
    // Use the cache if within a day...
    var dt = (DateTime)IsolatedStorageSettings.
               ApplicationSettings[&quot;PublisherAppsControls.Items.DateTime&quot;];
    if (DateTime.Now.Subtract(dt).TotalDays &lt; 1)
    {
        ctrl.Apps.Clear();
        foreach (var i in items) ctrl.Apps.Add(i);
        return;
    }
}</pre></pre><h3>Next Steps</h3><p>I haven't tested this app against publishers with large numbers of apps.&nbsp; I'm not sure if they would all come back in the response or if there would be more requests to make.&nbsp; It would also be good to filter out the currently running app.&nbsp; This could be obtained from the WMAppManifest.xml file.&nbsp; As mentioned in the article, it would also be good to restrict the offer to the current country, but I really don't know how to do that without using the location API, which seems too heavy-handed.</p><p>It would be nice to create a general-purpose library for Zune Marketplace data.&nbsp; There are some good starts out there from the likes of Brandon Watson and Jesse Liberty, a CodePlex library, and even another Coding4Fun project, but much of that is based on general catalog data, or specialized for music entries.&nbsp; Even better would be if Microsoft can put out their own API!&nbsp; That would ensure a better experience if/when formats change over time.</p><h3>Conclusion</h3><p>XML has made the world of data so much easier to consume!&nbsp; As soon as I saw structured data as the foundation for Zune I knew this would be a pretty easy project.&nbsp; Being able to advertise all of your apps in each of your apps provides a great way to promote with a minimum of effort.</p><h3>About the Author</h3><p><a href="http://www.ariankulp.com/">Arian Kulp</a> is a software developer living in Western Oregon. He creates samples, screencasts, demos, labs, and articles, speaks at programming events, and enjoys hiking and other outdoor adventures with his family.</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/coding4fun/rss&WT.dl=0&WT.entryid=Entry:RSSView:f3231d90e6ca4435ade49ff2014347ff">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/articles/Let-your-apps-sell-themselves</comments>
      <link>http://channel9.msdn.com/coding4fun/articles/Let-your-apps-sell-themselves</link>
      <itunes:summary>Don&#39;t miss any opportunity to market your Windows Phone apps!&amp;nbsp; Each one of your apps can serve as an ad for your other apps.&amp;nbsp;&amp;nbsp;&amp;nbsp; Learn how to add a listing of everything you have published in Marketplace to each of your apps.&amp;nbsp; Even better, it will always be up to date!IntroductionI&#39;ve written a number of Windows Phone apps, and each time I&#39;ve wanted to let people know about my other apps.&amp;nbsp; While I could mention the other apps somewhere, I wouldn&#39;t want to update all of my apps each time I release a new one.&amp;nbsp; It finally occurred to me that I could use the listing of apps directly from Marketplace instead.&amp;nbsp; This provides me with an easy-to-parse XML feed (Atom) of my apps with all of the info that I need.&amp;nbsp; Armed with that, it wasn&#39;t too much work to create a user control to let me drop in the list of apps anytime I need it.This code doesn&#39;t require a physical phone, but it isn&#39;t very useful if you don&#39;t have a Marketplace account!&amp;nbsp; Ideally, you should have several published apps under your account for this to make much sense.&amp;nbsp; Once you have it in place though, all of your apps will always show your complete list without any special updates.If you don&#39;t have the software installed, go to create.msdn.com, then click Download the free tools to download the Windows Phone Developer Tools (or use the direct download link provided above this Introduction section). This code is written for the Windows Phone Developer Tools 7.1 (Mango).&amp;nbsp; It’s is a mostly online install, and it’s pretty big so expect it to take some time. Even if you don’t have any development tools, this will give you Visual Studio Express, Blend, and XNA Game Studio. If you have the full-version tools already, it will add new templates.Project BasicsThe intention is to create a user control to display a list of apps from a given publisher (preferably yourself!).&amp;nbsp; This user control will be implemented as a ListBox with individual apps showing up v</itunes:summary>
      <pubDate>Mon, 13 Feb 2012 22:05:25 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/articles/Let-your-apps-sell-themselves</guid>
      <dc:creator>atkulp</dc:creator>
      <category>phone-7</category>
      <category>user+controls</category>
  </item>
  <item>
      <title>Kinect Service</title>
      <description><![CDATA[<p>The <strong>Coding4Fun Kinect Service</strong> allows you to stream Kinect color, depth, skeleton, and audio from one PC to another PC or a Windows Phone via sockets. Both server and client libraries are available to send and receive the data.&nbsp; Please review the included WPF and Windows Phone samples for a quick explanation of how to use the libraries.&nbsp; Also check out the <a href="http://kinectservice.codeplex.com/documentation">Documentation tab</a> on CodePlex for more information and sample usage.</p><h2>WPF Sample Screenshots</h2><p><a href="http://download.codeplex.com/Download?ProjectName=kinectservice&amp;DownloadId=336814"><img title="Untitled" src="http://download.codeplex.com/Download?ProjectName=kinectservice&amp;DownloadId=336815" alt="Untitled" width="426" height="238" border="0"></a></p><h2>Windows Phone Sample Screenshots</h2><p><a href="http://download.codeplex.com/Download?ProjectName=kinectservice&amp;DownloadId=336926"><img title="3" src="http://download.codeplex.com/Download?ProjectName=kinectservice&amp;DownloadId=336927" alt="3" width="164" height="272" border="0"></a><a href="http://download.codeplex.com/Download?ProjectName=kinectservice&amp;DownloadId=336928"><img title="1" src="http://download.codeplex.com/Download?ProjectName=kinectservice&amp;DownloadId=336929" alt="1" width="164" height="272" border="0"></a><a href="http://download.codeplex.com/Download?ProjectName=kinectservice&amp;DownloadId=336930"><img title="2" src="http://download.codeplex.com/Download?ProjectName=kinectservice&amp;DownloadId=336931" alt="2" width="164" height="272" border="0"></a></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/coding4fun/rss&WT.dl=0&WT.entryid=Project:RSSView:8c0d76e8ee8942c69f429feb0050b146">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/projects/Kinect-Service</comments>
      <link>http://channel9.msdn.com/coding4fun/projects/Kinect-Service</link>
      <itunes:summary>The Coding4Fun Kinect Service allows you to stream Kinect color, depth, skeleton, and audio from one PC to another PC or a Windows Phone via sockets. Both server and client libraries are available to send and receive the data.&amp;nbsp; Please review the included WPF and Windows Phone samples for a quick explanation of how to use the libraries.&amp;nbsp; Also check out the Documentation tab on CodePlex for more information and sample usage.WPF Sample ScreenshotsWindows Phone Sample Screenshots</itunes:summary>
      <pubDate>Thu, 02 Feb 2012 04:53:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/projects/Kinect-Service</guid>
      <dc:creator>Brian Peek</dc:creator>
      <category>kinect</category>
  </item>
  <item>
      <title>Netduino Controlled LED Cube</title>
      <description><![CDATA[<p>Commercial LED cubes have been around for a while now and can be quite large and capable of some <a href="http://www.seekway.com.cn/e/3d/h32/detail.htm">interesting displays</a>. This project is on a smaller scale and goes through the steps required to build a Netduino Mini-controlled 512 LED cube (8 x 8 x 8).</p><p>Clearly, the Mini does not have 512 pins and so we use <a href="http://en.wikipedia.org/wiki/Persistence_of_vision">Persistence of Vision</a> to control the LEDs in the cube. The result is that seven pins on the Netduino Mini can control 512 LEDs.</p><p>At the end of this article you should be able to create a cube capable of the following:</p><p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/FdpeC0GSRkM&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/FdpeC0GSRkM&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p><h3>Bill of Materials</h3><table class="MsoTableLightShadingAccent1" border="1" cellspacing="0" cellpadding="0"><tbody><tr><td valign="top" width="308"><p class="MsoNormal"><span>Description</span></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>Quantity</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>LEDs (I chose blue)</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>512</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>74HC595 Shift Registers</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>8</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>74HC238 3 to 8 line decoder</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>1</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>Netduino Mini</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>1</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>16 Pin DIL Socket (0.3&quot;)</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>9</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>24 Pin DIL Socket (0.6&quot;)</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>1</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>TIP122 NPN Transistor</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>8</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>100nF Ceramic Capacitor</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>10</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>2.2K Resistor</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>8</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>68 Ohm 0.25W Resistor (you may need to change these depending upon the LED you choose)</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>64</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>8 Way Single Row Socket</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>9</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>36 Way Header Strip (Straight)</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>3</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>2 Way Single Row Socket</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>2</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>2 Way PCB Mount Terminal Connector</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>1</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>8 Way Cable (ribbon or alarm)</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>2.5m</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>Wire</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>Miscellaneous</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>Pad board 160 x 115 Hole</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>1</span></p></td></tr><tr><td valign="top" width="308"><p class="MsoNormal"><strong><span>Hex PCB spacer and screw (M3 threaded)</span></strong></p></td><td valign="top" width="143"><p class="MsoNormal" align="center"><span>4</span></p></td></tr></tbody></table><p><strong></strong>&nbsp;</p><p><strong>The following items are also required:</strong></p><ul><li>5V Power capable of delivering 2A </li><li>Solder (I used about 15 metres over the life of this project). </li><li>One 30cm x 30cm piece of wood </li><li>Drill and wood drill bits (4mm – 5mm) </li><li>Some cardboard and tape </li><li>A fair amount of patience </li><li>Good attention to detail </li></ul><p>You may need to shop around for the LEDs. I went to my preferred supplier and was quoted 18.5 pence each. By going on eBay I managed to negotiate the price down to 2.5 pence each including delivery. You are buying in bulk so don’t be afraid to ask for a good bulk price. Also, buy a few more than you need in case you have a faulty part or break a few.</p><h3>Building the Cube</h3><p>This is probably the most time consuming part of the project requiring a lot of patience and testing. The aim of the project is to convert these 512 blue LEDs:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B2%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb.png" alt="image" width="602" height="449" border="0"></a></p><p>Into this:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B5%5D-3.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B1%5D-1.png" alt="image" width="602" height="615" border="0"></a></p><h4>Shaping the LEDs</h4><p>The exact dimensions of the cube depend upon the length of the legs on the LEDs. The legs are soldered together with the cathodes of the LEDs forming a horizontal plane and the anodes vertically connecting the layers. Each of the layers are configured into a common cathode display.</p><p>Take one of the LEDs and bend the cathode at a point as close to the body of the LED as possible. The cathode should be at 90 degrees to the anode and parallel to the flat base of the LED. This allows the horizontal legs to be soldered together to form the common cathode.</p><p>Shaping the anode is a little more difficult. The anodes connect the horizontal layers and so need to be shaped to ensure that each LED in the layer is directly above the corresponding LED in the layer below. Otherwise, each layer will be slightly offset from the one beneath it.</p><p>To achieve this, bend the anode in the opposite direction as described for the cathode. Then, still working with the anode, start about 2mm along the leg. Finally, bend the top 2-3mm through and fashion an angle at 90 degrees pointing back to the LED body. The end result should look like this:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B8%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B2%5D-3.png" alt="image" width="624" height="526" border="0"></a></p><p>The horizontal leg is the cathode and the vertical leg is the anode. When these are connected it should look like this:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B11%5D-1.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B3%5D-4.png" alt="image" width="520" height="864" border="0"></a><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B14%5D-1.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B4%5D-1.png" alt="image" width="248" height="864" border="0"></a></p><p>Notice how the shaped anode allows the LEDs to be placed above each other.</p><p>Now repeat this process for the remaining 511 LEDs.</p><h4>Building a Layer</h4><p>Our next task is to connect the LEDs together. This is best achieved by using a template for the individual layers. Use a piece of wood with a grid of holes drilled into it as the template.</p><p>Measure the distance from the center of the now horizontal cathode to the end of the leg and subtract about 2mm. This will tell you how far apart the LEDs are in the horizontal plane. The 2mm will be used to overlap with the neighboring LED and will connect the cathodes. Now drill an 8 x 8grid of holes, each of which are distance of your choosing apart.&nbsp; Here they are 20mm apart.</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B17%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B5%5D.png" alt="image" width="381" height="380" border="0"></a></p><p>The holes need to be large enough to hold the LEDs securely but should not be so small that the LEDs are wedged into the hole and difficult to remove.</p><p>Take eight of the LEDs and place them along the top row with the cathodes all pointing to either the right or the left. If all are pointing to the right, the cathodes of seven LEDs will overlap slightly with the next LED to the right. The rightmost cathode will go off into space. Solder the cathodes together.</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B20%5D-1.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B6%5D-2.png" alt="image" width="624" height="84" border="0"></a></p><p>Now let’s add the remaining LEDs in the layer. I started on the left because I hold the soldering iron in my right hand. Take another seven LEDs and place these under the top row and down the far left column. The cathode of each first LED should overlap the cathode of the LED in the top layer. Solder these together.</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B23%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B7%5D-1.png" alt="image" width="624" height="394" border="0"></a></p><p>Repeat with the remaining columns. At this point, you should have a horizontal row of LEDs connected together with eight strings of seven LEDs hanging from it. Eventually you should have something looking like this:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B26%5D-1.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B8%5D-4.png" alt="image" width="624" height="468" border="0"></a></p><p>Now test the layer using a power supply and current limiting resistor. A 5V supply and a 68 Ohm resistor are adequate. Ground the cathode of the LED pointing off into space. Now touch each leg of the LEDs in turn with the positive output of the supply (through the current limiting resistor, of course). Each LED should light up and as you touch the anode.</p><p>One final bit of soldering is needed to add a stiffening wire to the layer. Cut and strip a piece of wire. The wire should be long enough to cross the entire layer. Place the stripped wire on the cathodes of the LEDs at the bottom of the string and solder it on to each.</p><p>At this point you will have one complete layer. Remove the layer from the template. This should be done carefully so that you do not put too much stress on the joints. Gently lifting it up with a screwdriver should help. Don’t hurry. Put this layer to one side and repeat another seven times.</p><h4>Connecting the Layers - The Cube Appears</h4><p>Now that all of the layers are built, test them again. This repeated test may save you future pain. Just imagine how difficult it will be to fix a bad joint in the middle of the cube. Check that the LEDs are still connected and none of the joints were broken when layers were removed from the template.</p><p>Now drop one of the layers back into the template. What we now need to do is to place a second layer on top of the first so that the anodes of the layer in the template touch the anodes of the LEDs in the upper layer. Once in place, we need to solder the anodes together, and so need a way of supporting the top layer whilst connecting the LEDs. A strip of cardboard can accomplish this. Cut the cardboard into strips (making sure the cardboard is the height needed to support the layer) and bind the strips together with tape. Two of these strips should be enough to support the layer. Here’s how it looked when several layers had already been connected:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B29%5D-1.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B9%5D.png" alt="image" width="624" height="631" border="0"></a></p><p>Now that you have the layer supported, solder the anode of each LED in the top layer to the anode of the corresponding LED in the layer directly beneath it. Once this has been done, test each LED. Connect the cathode of the bottom layer to ground and touch each of the legs on the top layer in turn with the positive supply (going through the current limiting resistor). The LED on the bottom layer should light up. Repeat for each LED in the layer. Move the cathode to the top layer and repeat the test—this time the LED on the top layer should light. Again, repeat for each LED in the layer.</p><p>Now add the remaining layers. Just for safety, test every layer in the cube as it is built up. This repeated testing sounds like a big pain, but trust me it's worth it. At this point you will have a cube of LEDs looking something like this:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B32%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B10%5D-3.png" alt="image" width="624" height="650" border="0"></a></p><p>Now trim the cathodes that are still flying off into space.</p><h3>Building the Controller Board</h3><p>The controller board will allow any of the 512 LEDs in the cube to be turned on by a Netduino Mini using only seven pins.</p><h4>Persistence of Vision</h4><p>Connecting the anode to a positive supply while grounding the layer in which the LED is located can turn on any LED. You can also do this with more than one LED in a layer, and so within a layer can turn on 0 to 64 LEDs. To light the entire cube, we need to switch on each layer in turn while doing so fast enough to give the impression of static image. This is where the principle of <a href="http://en.wikipedia.org/wiki/Persistence_of_vision">Persistence of Vision</a> comes into play.</p><p>The basic algorithm is as follows:</p><ul><li><em>Layer</em> = 0 </li><li>Repeat <ul><li>Connect the anodes of the desired LEDs in <em>Layer</em> to positive supply </li><li>Connect <em>Layer</em> to ground (this turns the layer on) </li></ul></li><li>Move to next <em>Layer</em> </li></ul><p>If we do this fast enough, the human eye will see a single image as when watching TV or a movie.</p><p>Our basic building blocks for the controller are as follows:</p><ul><li>Microcontroller (a Netduino Mini) to run the whole show </li><li>Hardware to select the layer to be turned on (74HC238 and TIP122 transistors) </li><li>Hardware to turn on the LEDs (Shift registers) </li></ul><h4>Shift Registers</h4><p>The shift registers determine which LEDs are turned on. The board has a series of eight cascaded 74HC595 registers. This allows us to control 64 LEDs (8 chips x 8 outputs). The following schematic shows how two of these registers should be wired together:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B38%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B12%5D-2.png" alt="image" width="624" height="498" border="0"></a></p><p>The above should be repeated until you have eight shift registers cascaded.</p><p>The output from the register is 5V and will give more than enough power to burn out an LED, so we need to put a <a href="http://en.wikipedia.org/wiki/LED_circuit">current limiting resistor</a> in the circuit. A 68 Ohm resistor is required for the LEDs in this project—make sure you verify the value you choose against the LEDs used.</p><p>Putting this together gives the following layout:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B41%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B13%5D.png" alt="image" width="624" height="373" border="0"></a></p><p>Each socket holds a 74HC595 shift register. The connections are identical for each register with the data cascaded into the next register. So if we look at the bottom left socket you will see the following:</p><ul><li>Below the socket there is a connector that allows the output to be connected to the LEDs in the cube. </li><li>Above the connector are the resistors that limit the current flowing through the LEDs. </li><li>The socket above that will hold the 74HC595 shift register. </li><li>To the left of the socket is a 100nF capacitor. This smooths out the power supplied to the shift register and is connected between the power input and ground and placed as close to the IC as possible. </li></ul><p>The following colors have been used:</p><ul><li>Red = Power </li><li>Blue = SPI and cascaded data </li><li>Yellow = RCK </li><li>White = SPI clock </li></ul><p>Note that the connectors and current limiting resistor are slightly offset as output 0 is on pin 15 and this is routed on the underside of the board. The remaining connections are a direct one to one path from the pin to the resistor/connector.</p><p>The microcontroller uses the <a href="http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus">Serial Peripheral Interface</a> (SPI) bus to tell the shift registers which LED to turn on. The data from the registers is cascaded and so we can store 64 bits of information (1 bit for each LED in a layer). With logic 1 turning a particular LED on and 0 turns the LED off.</p><h4>Layer Switching</h4><p>The layer switching logic allows the controller to connect any one of the layers to ground (using a common cathode). Coupling this with the LED selection logic above allows us to turn on any one of the LEDs in the cube. This is achieved by using a transistor as a switch. The TIP122 was selected because it is capable of sinking 2A. This may seem like a lot considering the 25mA for each LED, but remember that we potentially have 64 LEDs being turned on at once. This means we may be drawing 1.6A of current. If you use a different LED, you will need to verify that the shift registers, power supply, and the transistor are capable of dealing with the amount of power you will be drawing.</p><p>The schematic for the layer switching looks like this:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B44%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B14%5D-2.png" alt="image" width="624" height="468" border="0"></a></p><p>The 74HC238 has three input signals. These represent a binary number 0-7. The chip converts this number into eight output lines. 0 turns on line 0, 1 turns on line 1 etc. The output from each line (0 through 7) is then fed in the base of a TIP122 transistor. This turns on the appropriate layer by connecting the layer through to ground.</p><p>One line for the Netduino Mini controls enable line on the 72HC238 chip. This allows us to turn all of the outputs off whilst a new value is being loaded into the chip. This line is used to make sure that the transitions between the states are “invisible.” Without this there is the chance that the viewer may see a flickering effect when new values are loaded into both the 74HC595s and the 74HC238.</p><h4>The Completed Controller Board</h4><p>The completed controller board looks something like this:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B47%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B15%5D.png" alt="image" width="624" height="491" border="0"></a></p><p>Note that there are a pair of connectors to the top right and bottom left of the Netduino Mini. The pair at the top right breakout the COM1 port. The two at the bottom left allow grounding of an FTDI lead (connected to the controller board) and also one socket that is not connected. This allows the 5V lead on the FTDI connector to have a place to live and not be in danger of touching something it shouldn’t.</p><p>And on the underside:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B50%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B16%5D.png" alt="image" width="624" height="444" border="0"></a></p><h4>Connecting the Cube and Controller</h4><p>The final task (from a hardware point of view) is to connect the cube to the controller board. I tried both ribbon cable and alarm cable. The alarm cable was a little more difficult to connect but was flexible. The ribbon cable was easier to work with but was not as flexible. The principle is the same whichever you chose.</p><p>Place the cube on a flat surface (the anodes touching the surface) with one face of the cube facing you. The connections should be made so that the lower back left corner is co-ordinate (0, 0, 0). The co-ordinates increase moving to the right, towards you and up. So looking at the controller board above, shift register 0 connects to the LEDs farthest away from you with output 0 from the register connecting to the LED to the far left. Cut and make the 8 cables according to this pattern varying the lengths to suit the location of the controller board with respect to the cube. Each cable will need a single eight-way socket on one end with the other end connected to the appropriate LED.</p><p>The layer selection logic should be connected using a similar cable. Each layer should be connected to a TIP122 with layer 0 being the bottom layer.</p><p>The cube will then look like this:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B53%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B17%5D-1.png" alt="image" width="624" height="587" border="0"></a></p><p>Connecting it up to the controller:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B56%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B18%5D.png" alt="image" width="624" height="346" border="0"></a></p><p>I found it easier to be consistent and wire each plug and LED identically, and so all of the connections above have a black wire to the right of the connector. It helps with connecting things up later.</p><p>If we have everything connected then we only need one more thing...</p><h3>Software</h3><p>The software running the cube needs to perform two main tasks:</p><ul><li>Work out which LEDs are turned on </li><li>Run the display (cube) </li></ul><p>These two tasks need to be performed at the same time (or so fast that they appear to run at the same time). Luckily the .NET Micro Framework has a built in mechanism to allow us to do this—threading. Threading allows us to do this by running two tasks interleaved. So task 1 will run for a while, the system will then switch and run task 2 for a while, then back to task 1 and so on.</p><p>To do this, the software is split into two parts, the main program that decides what to display and a separate class that runs the display.</p><h4>LEDCube Class</h4><p>This class has only one purpose in life, to output data to the controller board and so “run” the display. It is a relatively simple class containing the following methods:</p><ul><li>Constructor </li><li>Buffer update method </li><li>Display Buffer method </li></ul><p>The constructor sets everything up by instantiating an instance of the SPI class and setting the buffer (which contains the data to be displayed) to be empty, effectively clearing the cube:</p><p><pre class="brush: csharp">public LEDCube()
{
    config = new SPI.Configuration(SPI_mod: SPI.SPI_module.SPI1,
                                   ChipSelect_Port: Pins.GPIO_PIN_20,
                                   ChipSelect_ActiveState: false,
                                   ChipSelect_SetupTime: 0,
                                   ChipSelect_HoldTime: 0,
                                   Clock_IdleState: true,
                                   Clock_Edge: true,
                                   Clock_RateKHz: 100);    spi = new SPI(config);
    buffer = new byte[64];
    for (int index = 0; index &lt; buffer.Length; index&#43;&#43;)
    {
        buffer[index] = 0;
    }
}</pre></p><p>The buffer is 64 bytes of data, 8 rows of 8 bytes. Each byte corresponds to a vertical layer in the cube.</p><p>The UpdateBuffer method allows the calling program to change what is displayed in the cube. A little control is needed here to ensure that the pattern displayed in the cube is consistent, and so locking is used to ensure that the buffer cannot be updated part way through a display cycle:</p><p><pre class="brush: csharp">public void UpdateBuffer(byte[] newValues)
{
    lock (buffer)
    {
        for (int index = 0; index &lt; buffer.Length; index&#43;&#43;)
        {
            buffer[index] = newValues[index];
        }
    }
} </pre></p><p>The final method in this class is the method spawned off into it’s own thread:</p><p><pre class="brush: csharp">public void DisplayBuffer()
{
    while (true)
    {
        lock (buffer)
        {
            byte[] displayData = new byte[8];            for (int row = 0; row &lt; 8; row&#43;&#43;)
            {
                int offset = row * 8;                for (int index = 0; index &lt; 8; index&#43;&#43;)
                {
                    displayData[index] = buffer[offset &#43; index];
                }                enable.Write(true);
                bit0.Write((row &amp; 1) != 0);
                bit1.Write((row &amp; 2) != 0);
                bit2.Write((row &amp; 4) != 0);
                spi.Write(displayData);
                enable.Write(false);
            }
        }
    }
}</pre></p><p>This method again uses the lock statement to lock the buffer. This means we cannot update the buffer until a full cube of data has been displayed. The method takes a block of eight bytes representing a layer and then writes this to the shift registers using SPI. Note that the spi.Write is embedded in the write to the enable line. This ensures that all of the layers are turned off whilst we are updating the shift registers.</p><p>Wrapping all of this in the LEDCube class means that we now have a very simple class where we can spawn the DislpayBuffer method into its own thread.</p><h4>Main Program</h4><p>The main program sets the cube up and then controls what is actually shown in the cube. The first thing we need to do is to set up a buffer to store the cube display and then spawn off the DisplayBuffer into its own thread.</p><p><pre class="brush: csharp">private static LEDCube cube = new LEDCube();
private static byte[] newFrame = new byte[64];
ClearCube();
Cube.UpdateBuffer(newFrame);
Thread display = new Thread(new ThreadStart(cube.DisplayBuffer));
display.Start(); </pre></p><p>The ClearCube method is trivial and simply sets all of the bytes in newFrame to zero. At this point we have a cube with a whole lot of nothing going on. The next thing we need to do is to add some effects.</p><h4>Making it Rain</h4><p>Now that we have the mechanism to control the cube, we simply need to work out what we want to display. The rain effect in the opening video illustrates the majority of the techniques used to control the cube.</p><p>The rain algorithm is as follows:</p><ul><li>Set up the cube with a number of rain drops </li><li>Repeat <ul><li>Count the drops in the bottom layer </li><li>Move drops down one layer </li><li>Add the number of drops that have disappeared back into the top layer </li></ul></li></ul><p>To do this we will create two methods:</p><ul><li>AddDrops </li><li>Rain </li></ul><p><pre class="brush: csharp">private static void AddDrops(int count, int plane = -1)
{
    for (int drops = 0; drops &lt; count; drops&#43;&#43;)
    {
        bool findingSpace = true;
        while (findingSpace)
        {
            int x = rand.Next() % 8;
            int y = rand.Next() % 8;
            int z;            if (plane == -1)
            {
                z = rand.Next() % 8;
            }
            else
            {
                z = plane;
            }            int position = (z * 8) &#43; y;
            byte value = (byte) ((1 &lt;&lt; x) &amp; 0xff);
            if ((newFrame[position] &amp; value) == 0)
            {
                newFrame[position] |= value;
                findingSpace = false;
            }
        }
    }
}</pre></p><p>AddDrops simply adds a specified number of rain drops to the buffer. It also makes sure that if asked for 10 it will always add 10 by checking to see if one exists in the location it wanted to use (check out the findingSpace variable):</p><p><pre class="brush: csharp">private static void Rain(int noDrops, int cycles)
{
    ClearCube();
    AddDrops(noDrops);
    cube.UpdateBuffer(newFrame);
    for (int currentCycle = 0; currentCycle &lt; cycles; currentCycle&#43;&#43;)
    {
        int bitCount = 0;
        for (int plane = 0; plane &lt; 8; plane&#43;&#43;)
        {
            byte value = 1;
            for (int bit = 0; bit &lt; 8; bit&#43;&#43;)
            {
                if ((newFrame[56 &#43; plane] &amp; value) &gt; 0)
                {
                    bitCount&#43;&#43;;
                }
                value &lt;&lt;= 1;
            }
        }
        for (int plane = 7; plane &gt; 0; plane--)
        {
            for (int currentByte = 0; currentByte &lt; 8; currentByte&#43;&#43;)
            {
                newFrame[(plane * 8) &#43; currentByte] = newFrame[((plane - 1) * 8) &#43; currentByte];
            }
        }
        for (int b = 0; b &lt; 8; b&#43;&#43;)
        {
            newFrame[b] = 0;
        }
        AddDrops(bitCount, 0);
        cube.UpdateBuffer(newFrame);
        Thread.Sleep(75);
    }
}</pre></p><p>Rain adds the specified number of drops to the newFrame, shows the drops, and then moves them all down by one horizontal plane. Before doing this, it counts how many drops are going to fall out of the cube (the number in the bottom horizontal plane). After all the drops have moved down one plane it adds the drops which have disappeared out of the bottom of the cube back in at the top in random positions.</p><p>We can display this by adding the following to the main program:</p><p><pre class="brush: csharp">while (true)
{
    Rain(10, 60000);
} </pre></p><p>Full source code at <a href="http://netduinoledcontrol.codeplex.com/">http://netduinoledcontrol.codeplex.com/</a>.</p><p>If you add your own effects, remember to consider the rating of the equipment and parts used. Turning on a full horizontal layer consumes 1.6A for the LEDs alone. Things can get warm/hot if every LED in the cube is turned on at the same time so avoid such effects.</p><h3>Conclusion</h3><p>When I started out on this project I was not sure how fast the Netduino Mini could control the cube. It has proven that it is up to the task of keeping the display running whilst also being able to work on the upcoming “frame.” If you have gone this far and built a cube then how about expanding it:</p><ul><li>Add some filters and a microphone and make the display respond to its environment </li><li>Connect the cube to a PC using Bluetooth </li><li>Add an MP3 player module and write software to synchronise the display to the music </li></ul><p>Where will you take it?</p><h3>About The Author</h3><p>Mark Stevens is a software engineer and self-confessed technology addict. Mark started in the computer industry in the 1980s and at the age of 16 wrote a disk operating system for a then state of the art 8-bit microprocessor (despite the fact the machine already had one). He did it for fun and has been hooked on IT ever since then. Mark currently writes line of business applications for Win32, ASP.NET, and Silverlight platforms. He has recently taken up microelectronics as a hobby and has since discovered that his wife does not like the smell of solder. Marks’ current exploits, thoughts, and contact information can be found on his <a href="http://blog.mark-stevens.co.uk/">blog</a>.</p><p class="MsoNormal">&nbsp;</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/coding4fun/rss&WT.dl=0&WT.entryid=Entry:RSSView:a6740467db934541858d9f9101670ead">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/articles/Netduino-Controlled-LED-Cube</comments>
      <link>http://channel9.msdn.com/coding4fun/articles/Netduino-Controlled-LED-Cube</link>
      <itunes:summary>Commercial LED cubes have been around for a while now and can be quite large and capable of some interesting displays. This project is on a smaller scale and goes through the steps required to build a Netduino Mini-controlled 512 LED cube (8 x 8 x 8).Clearly, the Mini does not have 512 pins and so we use Persistence of Vision to control the LEDs in the cube. The result is that seven pins on the Netduino Mini can control 512 LEDs.At the end of this article you should be able to create a cube capable of the following:Bill of MaterialsDescriptionQuantityLEDs (I chose blue)51274HC595 Shift Registers874HC238 3 to 8 line decoder1Netduino Mini116 Pin DIL Socket (0.3&amp;quot;)924 Pin DIL Socket (0.6&amp;quot;)1TIP122 NPN Transistor8100nF Ceramic Capacitor102.2K Resistor868 Ohm 0.25W Resistor (you may need to change these depending upon the LED you choose)648 Way Single Row Socket936 Way Header Strip (Straight)32 Way Single Row Socket22 Way PCB Mount Terminal Connector18 Way Cable (ribbon or alarm)2.5mWireMiscellaneousPad board 160 x 115 Hole1Hex PCB spacer and screw (M3 threaded)4&amp;nbsp;The following items are also required:5V Power capable of delivering 2A Solder (I used about 15 metres over the life of this project). One 30cm x 30cm piece of wood Drill and wood drill bits (4mm – 5mm) Some cardboard and tape A fair amount of patience Good attention to detail You may need to shop around for the LEDs. I went to my preferred supplier and was quoted 18.5 pence each. By going on eBay I managed to negotiate the price down to 2.5 pence each including delivery. You are buying in bulk so don’t be afraid to ask for a good bulk price. Also, buy a few more than you need in case you have a faulty part or break a few.Building the CubeThis is probably the most time consuming part of the project requiring a lot of patience and testing. The aim of the project is to convert these 512 blue LEDs:Into this:Shaping the LEDsThe exact dimensions of the cube depend upon the length of the legs on the LEDs.</itunes:summary>
      <pubDate>Mon, 07 Nov 2011 22:50:33 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/articles/Netduino-Controlled-LED-Cube</guid>
      <dc:creator>Mark Stevens</dc:creator>
      <category>animation</category>
      <category>led</category>
      <category>electronics</category>
      <category>netmf</category>
  </item>
  <item>
      <title>KinectoPhone – Kinect and Windows Phone working together</title>
      <description><![CDATA[<p>A while ago we saw a <a href="http://www.youtube.com/watch?v=0J_Achk3_ZQ">demo from Microsoft</a> that showed how it is possible to use Windows Phone to interact with a Kinect-powered game. During the Kinect Code Camp, right before the official release of the Kinect for Windows SDK beta, <a href="http://adamkinney.com/blog/">Adam Kinney</a>, <a href="https://twitter.com/#%21/rickbarraza">Rick Barazza</a>, and I decided to work on a proof-of-concept project that would provide the same platform integration in a non-commercial development environment. Because it involved the main character hopping around collecting bonus items, we called the project Bunnyhop (codename KinectoPhone).</p><h1>Initial Mashup</h1><p>The project was divided into three major components:</p><p><strong>The desktop client</strong> – a Kinect-controlled 3D environment. It is only partially controlled by the motion sensor, since other responsibilities are delegate to the phone. Because it is a proof-of-concept and not a full-sized game, WPF is the primary sub-framework.</p><p><strong>The mobile client</strong> – a Windows Phone application that also is in charge of partially controlling the 3D environment on the desktop client. We decided to use Silverlight in favor of XNA because we didn't want complex graphics and all we needed was the bird's eye view of the playable area.</p><p><strong>The server</strong> – one of the most interesting (and issue-generating) components. This was the link between the desktop and the mobile client. Initially we planned on using a WCF service (and we actually did for a while), but then we decided to use sockets for better performance..</p><h1>Developing the communication layer</h1><p>Since we decided to remove support for WCF and focus on sockets, we needed to figure out a way to send appropriate data to both clients. Given the fact that the amounts of data that are being sent across clients are not really big, it seemed a good idea to make the server broadcast a dual data set—a collection of indicators that are used by both the phone and desktop clients. It will be the client's responsibility to select the required value.</p><p>Here is the general structure of a data package broadcasted by the server:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B16%5D-1.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B10%5D-1.png" alt="image" width="240" height="106" border="0"></a></p><p>We tried to keep it as simple as possible. The desktop client is going to process the camera direction sent by the phone, and the phone will adjust the character position according to the movement generated by the Kinect-driven desktop client.</p><p>When the clients (both desktop and mobile) send data to the server, they identify themselves through a prefix. For example, the desktop client sends the following string to the server:</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B20%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B12%5D.png" alt="image" width="240" height="105" border="0"></a></p><p>The<strong> c prefix</strong> identifies the sender as the desktop client (computer). The phone sends the camera angle, led by the <strong>p prefix</strong> (phone):</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B24%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B14%5D.png" alt="image" width="240" height="107" border="0"></a></p><p>Before going any further, I must mention that socket communications on Windows Phone are fairly generic, so the code we decided to use is close to the <a href="http://go.microsoft.com/fwlink/?LinkId=219075">Sockets Sample on MSDN</a>. We added a custom string parser that makes sure that the proper data is read between devices.</p><h1>The server</h1><p>Our server is entirely based on socket interactions through the TCP layer. It is a .NET-based console application that is listening to incoming connections (limited to two) and is broadcasting the received content, synchronizing both the desktop and the mobile clients. It is a &quot;dummy&quot; server and so doesn't perform any data processing—it simply receives the data from one client and then passes it to another.</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B4%5D-1.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B2%5D-1.png" alt="image" width="595" height="300" border="0"></a></p><p>Here is how the listening process is organized:</p><p><pre class="brush: csharp">
public static void StartListening()
{

    byte[] dataBuffer = new Byte[StateObject.BUFFER_SIZE];
    IPEndPoint localEndPoint = new IPEndPoint(IPAddress.Any, PORT_NUMBER);
    Socket listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);

    try
    {
        listener.Bind(localEndPoint);
        listener.Listen(2);

        while (true)
        {
            completed.Reset();
            Console.WriteLine(&quot;Async transmission started.&quot;);
            listener.BeginAccept(new AsyncCallback(AcceptCallback),listener);
            completed.WaitOne();
        }

    }
    catch (Exception e)
    {
        Debug.WriteLine(e.ToString());
    }
}
</pre></p><p>The received byte array is later transformed to a standard string that is parsed according to the pattern described above. The parser detects the prefix and assigns the correct values depending on the sender.</p><p><pre class="brush: csharp">
private static void ParseContent(string content)
{
    var values = content.Split('|');
    if (content.StartsWith(&quot;c&quot;))
    {
        position = int.Parse(values[1]);
    }
    else if (content.StartsWith(&quot;p&quot;))
    {
        angle = int.Parse(values[1]);
    }
}
</pre></p><p>The difference in received data is present because each client is designed to affect only a part of the gameplay, and character movement cannot be directed by a desktop client or by the mobile application on its own. The mobile client reports the angle of character rotation, and the desktop client controls general movement progress and bonus pickups.</p><p>Once all values are read, the server broadcasts them back:</p><p><pre class="brush: csharp">
private static void Send(Socket handler)
{
    // The generalized string broadcasted by the server does not contain a platform
    // identifying prefix (p or c)
    string data = string.Format(&quot;{0}|{1}&quot;, angle, position);

    byte[] byteData = Encoding.UTF8.GetBytes(data);

    Console.WriteLine(&quot;DATA LENGTH [SENT] = {0} bytes. DATA = {1}&quot;, data.Length, data);

    handler.BeginSend(byteData, 0, byteData.Length, 0, new AsyncCallback(SendCallback), handler);
}
</pre></p><p>This is pretty much it when it comes to defining the server that handles cross-platform communications. It can be installed on a machine other than the one where the desktop client is running, as long as all of them work on either the same subnet or a network in which the IP addresses are static and have the invoked port open.</p><h1>The desktop client</h1><p>The desktop client was a bit of a graphical “fortress.” Rick was building the entire 3D environment while Adam and I were building the mobile application and the server interoperability layer.</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B12%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B8%5D-3.png" alt="image" width="636" height="397" border="0"></a></p><p>We used the newly launched Kinect SDK to access the connected Kinect and it was initialized the moment the main window is loaded:</p><p><pre class="brush: csharp">
void SetupKinect()
{
    nui = new Runtime();

    try
    {
        nui.Initialize(RuntimeOptions.UseSkeletalTracking);
    }
    catch (InvalidOperationException)
    {
        MessageBox.Show(&quot;Runtime initialization failed. Please make sure Kinect device is plugged in.&quot;);
        return;
    }

    nui.SkeletonFrameReady &#43;= new EventHandler&lt;SkeletonFrameReadyEventArgs&gt;(nui_SkeletonFrameReady);
}
</pre></p><p><strong>Runtime</strong> is the standard device class that identifies the Kinect currently connected to the PC. As long as we were using just one sensor, we did not need to provide a numeric index when instantiating the <strong>Runtime</strong> class itself.</p><p>Since we are only using skeletal tracking—the desktop client is responsible for moving the character forward on a detected jump—the Runtime instance is initialized with a <strong>RuntimeOptions.UseSkeletalTracking</strong> argument. The event handler is invoked once we detect a tracked skeleton:</p><p><pre class="brush: csharp">
void nui_SkeletonFrameReady(object sender, SkeletonFrameReadyEventArgs e)
{
    SkeletonFrame skeletonFrame = e.SkeletonFrame;

    foreach (SkeletonData data in skeletonFrame.Skeletons)
    {
        if (SkeletonTrackingState.Tracked == data.TrackingState)
        {

            phL = new Point(data.Joints[JointID.HandLeft].Position.X, data.Joints[JointID.HandLeft].Position.Y);
            phR = new Point(data.Joints[JointID.HandRight].Position.X, data.Joints[JointID.HandRight].Position.Y);
            pCore = new Point(data.Joints[JointID.HipCenter].Position.X, data.Joints[JointID.HipCenter].Position.Y);

            coreDeep = data.Joints[JointID.HipCenter].Position.Z;

            leftDeep = data.Joints[JointID.HandLeft].Position.Z - coreDeep;
            rightDeep = data.Joints[JointID.HandRight].Position.Z - coreDeep;

            handL.x = 640 &#43; 600 * phL.X;
            handL.y = 350 - 300 * phL.Y;
            handR.x = 640 &#43; 600 * phR.X;
            handR.y = 350 - 300 * phR.Y;

            bodyCore.x = 640 &#43; 30 * pCore.X;
            bodyCore.y = 350 - 300 * pCore.Y;

            follow.x = bodyCore.x;
        }
    }
}
</pre></p><p>The Kinect sensor monitors six skeletons at once, but not all of them are tracked for movement. That's the reason to check the <strong>SkeletonTrackingState</strong> before displaying the joint indicators on the screen.</p><p>The joint indicators themselves are declared in the XAML layout in the main page:</p><p><pre class="brush: xml">
&lt;Canvas x:Name=&quot;touch_screen&quot; Width=&quot;1280&quot; Height=&quot;720&quot; Background=&quot;#00FF0000&quot;&gt;
    &lt;local:BodyMarker x:Name=&quot;handL&quot;/&gt;
    &lt;local:BodyMarker x:Name=&quot;handR&quot;/&gt;
    &lt;local:BodyMarker x:Name=&quot;follow&quot; x=&quot;0&quot; y=&quot;0&quot;/&gt;
    &lt;local:BodyMarker x:Name=&quot;bodyCore&quot; x=&quot;0&quot; y=&quot;0&quot;/&gt;
&lt;/Canvas&gt;
</pre></p><p>The <strong>BodyMarker</strong> class is in fact a custom <strong>UserControl</strong>. It is easier to manage and later extend instances of a customizable unit rather than a simple ellipse:</p><p><pre class="brush: xml">
&lt;UserControl x:Class=&quot;KinectoPhone.Desktop.BodyMarker&quot;
             xmlns=&quot;<a class="linkification-ext" title="Linkification: http://schemas.microsoft.com/winfx/2006/xaml/presentation" href="http://schemas.microsoft.com/winfx/2006/xaml/presentation">http://schemas.microsoft.com/winfx/2006/xaml/presentation</a>&quot;
             xmlns:x=&quot;<a class="linkification-ext" title="Linkification: http://schemas.microsoft.com/winfx/2006/xaml" href="http://schemas.microsoft.com/winfx/2006/xaml">http://schemas.microsoft.com/winfx/2006/xaml</a>&quot;
             xmlns:mc=&quot;<a class="linkification-ext" title="Linkification: http://schemas.openxmlformats.org/markup-compatibility/2006" href="http://schemas.openxmlformats.org/markup-compatibility/2006">http://schemas.openxmlformats.org/markup-compatibility/2006</a>&quot;
             xmlns:d=&quot;<a class="linkification-ext" title="Linkification: http://schemas.microsoft.com/expression/blend/2008" href="http://schemas.microsoft.com/expression/blend/2008">http://schemas.microsoft.com/expression/blend/2008</a>&quot; &gt;
    &lt;Canvas&gt;
        &lt;Ellipse x:Name=&quot;bkg&quot; Width=&quot;10&quot; Height=&quot;10&quot; Canvas.Left=&quot;-5&quot; Canvas.Top=&quot;-5&quot;/&gt;
    &lt;/Canvas&gt;
&lt;/UserControl&gt;
</pre></p><p>In the skeleton tracking code above, we are not only tracking the joint position, we're also adjusting the character position based on the center hip location in space as well as detecting the jump by coordinating joint positions by the Z-axis.</p><p>The data is sent via an instance of the same AsynchronousClient I used on the server side, but with small modifications. I implemented a short verification mechanism that ensures the fact that I am using an IPv4 address as the endpoint will be functional with only IPv4 and not IPv6 addresses for the time being:</p><p><pre class="brush: csharp">
public AsynchronousClient()
{
    // The worker that is constantly syncing the state of the
    // desktop client with the server.
    backgroundWorker.DoWork &#43;= new DoWorkEventHandler(backgroundWorker_DoWork);

    IPHostEntry ipHost = Dns.GetHostEntry(&quot;192.168.173.1&quot;);

    var ipv4address = (from c in ipHost.AddressList where c.AddressFamily == AddressFamily.InterNetwork select c).First();

    if (ipv4address != null)
    {
        IPAddress ipAddress = (IPAddress)ipv4address;
        remoteEndPoint = new IPEndPoint(ipAddress, port);

        InitializeClient();
    }
}
</pre></p><p>The <strong>BackgroundWorker</strong> is managing the constant synchronization building the location and meta string that is being sent with updated character position and activity data from the desktop client:</p><p><pre class="brush: csharp">
void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
{
    if (!client.Connected)
    {
        client.Shutdown(SocketShutdown.Both);
        client.Close();
        InitializeClient();
    }

    DesktopData cd = (DesktopData)e.Argument;
    Send(client, string.Format(&quot;c|{0}&quot;, cd.Position));
    sendDone.WaitOne();

    // Receive the response from the remote device.
    Receive(client);
    receiveDone.WaitOne();
}
</pre></p><p>When the desktop client receives data, it only reads information regarding the camera angle. Therefore, that’s the only indicator we needed to set from the outside:</p><p><pre class="brush: csharp">
void aClient_ResponseReceived(object sender, ResponseReceivedEventArgs e)
{
    Dispatcher.Invoke(new Action(delegate
    {

        var values = e.Response.Split('|');

        cameraTargetRotation = Convert.ToDouble(values[0]);

    }), DispatcherPriority.Normal);
}
</pre></p><h1>Phone client</h1><p>The phone client has only one responsibility—adjust the camera angle as the user tilts the device. We used standard accelerometer-based capabilities to track the movement of the device in space.</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B29%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B17%5D.png" alt="image" width="453" height="272" border="0"></a></p><p>The app uses a different implementation of the <strong>AsynchronousClient</strong> called <strong>SocketHandler</strong>. It works well to link the phone to the server. For example, take a look at the handler that processes the received input:</p><p><pre class="brush: csharp">
private void ProcessReceive(SocketAsyncEventArgs e)
{
    if (e.SocketError == SocketError.Success)
    {
        // Received data from server
        string dataFromServer = Encoding.UTF8.GetString(e.Buffer, 0, e.BytesTransferred);

        Socket sock = e.UserToken as Socket;
        sock.Shutdown(SocketShutdown.Send);
        sock.Close();
        clientDone.Set();

        // Respond to the client in the UI thread to tell him that data was received
        System.Windows.Deployment.Current.Dispatcher.BeginInvoke(() =&gt;
        {
            ResponseReceivedEventArgs args = new ResponseReceivedEventArgs();
            args.response = dataFromServer;
            OnResponseReceived(args);
        });

    }
    else
    {
        clientDone.Set();
        throw new SocketException((int)e.SocketError);
    }
}
</pre></p><p>&nbsp;</p><p>Due to threading limitations, we had to use the dispatcher class to notify the UI about the fact that all data from the server was received and that it should be transformed to the position of the character on the map.</p><p>In the main page constructor, we are initializing the SocketHandler with the same values for the server as we did in the desktop client. Additionally, we're wiring an event handler that will handle the received string. Unlike ProcessReceive above, the wired event handler actually parses the string for required values and accordingly takes the appropriate action:</p><p><pre class="brush: csharp">
SocketHandler handler = new SocketHandler(&quot;192.168.1.6&quot;, 13001);
handler.ResponseReceived &#43;= new ResponseReceivedEventHandler(handler_ResponseReceived);

void handler_ResponseReceived(object sender, ResponseReceivedEventArgs e)
{
    previousPos = currentPos;

    string[] data = e.response.Split('|');
    int.TryParse(data[1], out currentPos);

    if (currentPos != previousPos)
    {
        targetIndex = currentPos;
    }
}
</pre></p><p>The data is sent back to the server with the help of a <strong>DispatcherTimer</strong> instance running every 300 milliseconds:</p><p><pre class="brush: csharp">
void timer_Tick(object sender, EventArgs e)
{
    handler.SendData(string.Format(&quot;p|{0}&quot;, curTriangleAngle.ToString(&quot;0&quot;)));
}
</pre></p><p>When the accelerometer detects a change in the current value, we make sure that the object is rotated in the right direction by checking the sign of the reading:</p><p><pre class="brush: csharp">
void accel_ReadingChanged(object sender, AccelerometerReadingEventArgs e)
{
    Dispatcher.BeginInvoke(new Action(() =&gt;
    {
        previousY = currentY;
        currentY = e.Y;

        if (e.Y &gt; .7 || e.Y &lt; -.7)
        {
            if (e.Y &gt; .7 &amp;&amp; !isTurnDirty)
            {
                isTurnDirty = true;
                Turn(1);
            }
            else if (e.Y &lt; -.7 &amp;&amp; !isTurnDirty)
            {
                isTurnDirty = true;
                Turn(-1);
            }
        }
        else
        {
            isTurnDirty = false;
        }
    
    }));
}

void Turn(double direction)
{
    currentTurnTime = DateTime.Now;
    TimeSpan diffResult = currentTurnTime.Subtract(lastTurnTime);
    if (diffResult.TotalSeconds &gt; 1)
    {
        lastTurnTime = currentTurnTime;
        targetTriangleAngle &#43;= direction * 90.0;
    }
}
</pre></p><p>The turn time is checked so that the character on the device screen doesn’t constantly rotate. Since the accelerometer is very sensitive and without a time limit, a slight tilt will have unexpected consequences on the rotation behavior.</p><h1>How to test</h1><p><a href="http://virtualrouter.codeplex.com/">Virtual Router</a> is a great way to test the set-up. Virtual Router allows the server computer to become a WiFi hotspot so that any connected device will be automatically registered as a part of the local subnet.</p><p>You will need:</p><ul><li><strong>A computer with a WiFi card (most laptops have them anyway)</strong> </li></ul><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B35%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B21%5D.png" alt="image" width="424" height="330" border="0"></a></p><p>Make sure that you have the WiFi card enabled and launch Virtual Router Manager. Set a new network name, as well as specify a password. It is worth mentioning that this network will act like a standard wireless network, so make sure you secure it with a strong password if you don't want it accessed from the outside.</p><p>Once you enable the hotspot, you can run the desktop client on the same machine. Connect the phone to the newly created wireless network and make sure that the proper IP is set in the code-behind for both the desktop client and the Windows Phone app.</p><p>The IP for the server machine can be found by running the ipconfig command in the console.</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B5%5D-2.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B2%5D-2.png" alt="image" width="455" height="230" border="0"></a></p><p>The IP address for the Windows Phone device that is connected to the hotspot is shown in the main Virtual Router Manager window.</p><p>In case the router cannot be started, make sure that connection sharing is enabled for your main connection and that it points to the Miniport interface.</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image%5B42%5D.png"><img title="image" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/image_thumb%5B26%5D.png" alt="image" width="544" height="408" border="0"></a></p><p>Once the network is correctly set up, I would highly recommend launching the project components in the following order:</p><ol><li>Server </li><li>Desktop client </li><li>Phone client </li></ol><h1>Conclusion</h1><p>With the latest 7.1 SDK update for Windows Phone as well as the 7.5 (Mango) OS, it is fairly easy to set up a Kinect-to-WP communication layer through sockets. With small modifications and performance optimizations we can also send Kinect imagery (captured through the depth and video sensors) directly to the phone without major delays. The field of third-party games that interoperate with Kinect and run on mobile devices is yet to be fully developed, but we already made the first steps in that direction.</p><h1>About the author</h1><p>Dennis Delimarsky is a Windows Phone Development MVP. He enjoys technical writing as well as building cool stuff around the .NET platform. Besides Coding4Fun, he also blogs at <a href="http://dennisdel.com/">Den by default</a>. He can be contacted at <a class="linkification-ext" title="Linkification: mailto:ddelimarsky@live.com">ddelimarsky@live.com</a>.</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/coding4fun/rss&WT.dl=0&WT.entryid=Entry:RSSView:a8028d44ac6d4e2dbbb29f07015cdce2">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/articles/kinectophone</comments>
      <link>http://channel9.msdn.com/coding4fun/articles/kinectophone</link>
      <itunes:summary>A while ago we saw a demo from Microsoft that showed how it is possible to use Windows Phone to interact with a Kinect-powered game. During the Kinect Code Camp, right before the official release of the Kinect for Windows SDK beta, Adam Kinney, Rick Barazza, and I decided to work on a proof-of-concept project that would provide the same platform integration in a non-commercial development environment. Because it involved the main character hopping around collecting bonus items, we called the project Bunnyhop (codename KinectoPhone).Initial MashupThe project was divided into three major components:The desktop client – a Kinect-controlled 3D environment. It is only partially controlled by the motion sensor, since other responsibilities are delegate to the phone. Because it is a proof-of-concept and not a full-sized game, WPF is the primary sub-framework.The mobile client – a Windows Phone application that also is in charge of partially controlling the 3D environment on the desktop client. We decided to use Silverlight in favor of XNA because we didn&#39;t want complex graphics and all we needed was the bird&#39;s eye view of the playable area.The server – one of the most interesting (and issue-generating) components. This was the link between the desktop and the mobile client. Initially we planned on using a WCF service (and we actually did for a while), but then we decided to use sockets for better performance..Developing the communication layerSince we decided to remove support for WCF and focus on sockets, we needed to figure out a way to send appropriate data to both clients. Given the fact that the amounts of data that are being sent across clients are not really big, it seemed a good idea to make the server broadcast a dual data set—a collection of indicators that are used by both the phone and desktop clients. It will be the client&#39;s responsibility to select the required value.Here is the general structure of a data package broadcasted by the server:We tried to keep it</itunes:summary>
      <pubDate>Thu, 08 Sep 2011 22:07:45 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/articles/kinectophone</guid>
      <dc:creator>Dennis Delimarsky</dc:creator>
  </item>
  <item>
      <title>ScriptTD</title>
      <description><![CDATA[ <p>Script TD is an open-source tower defense game engine for Windows Phone. If you want to create a game, you can do so just by changing some XML, images, and audio files in the Script TD game engine.&nbsp; With this ability, you can create any number of Tower Defense games without having to do any programming!&nbsp; If you want to extend out the engine, it was designed to allow this as well!</p><p><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/HomeScreen%5B3%5D.png"><img title="HomeScreen" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/HomeScreen_thumb%5B1%5D.png" alt="HomeScreen" width="300" height="180" border="0"></a><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/Empty%5B3%5D.png"><img title="Empty" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/Empty_thumb%5B1%5D.png" alt="Empty" width="300" height="180" border="0"></a><a href="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/gamePlay%5B7%5D.png"><img title="gamePlay" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/gamePlay_thumb%5B5%5D.png" alt="gamePlay" width="300" height="180" border="0"></a></p><p>If you want to learn <a href="http://channel9.msdn.com/coding4fun/articles/ScriptTD-Tower-Defense-Made-Easy">how to extend the engine, check out the Coding4Fun article</a>!</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/coding4fun/rss&WT.dl=0&WT.entryid=Project:RSSView:d88aa81942894c4abfad9efa012dfc13">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/projects/ScriptTD</comments>
      <link>http://channel9.msdn.com/coding4fun/projects/ScriptTD</link>
      <itunes:summary> Script TD is an open-source tower defense game engine for Windows Phone. If you want to create a game, you can do so just by changing some XML, images, and audio files in the Script TD game engine.&amp;nbsp; With this ability, you can create any number of Tower Defense games without having to do any programming!&amp;nbsp; If you want to extend out the engine, it was designed to allow this as well!If you want to learn how to extend the engine, check out the Coding4Fun article!</itunes:summary>
      <pubDate>Tue, 26 Jul 2011 18:24:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/projects/ScriptTD</guid>
      <dc:creator>Clint Rutkas, Larry Larsen</dc:creator>
      <category>windows+phone</category>
      <category>windows-phone-7</category>
      <category>xna</category>
  </item>
  <item>
      <title>Kinect Paint</title>
      <description><![CDATA[<p>Kinect Paint is a skeleton tracking application that allows you to become the paint brush!&nbsp; This application uses the Kinect for Windows SDK and its skeletal tracking feature to create a painting experience.&nbsp; Use several different tools, a simple color palette, and create a masterpiece!</p><p>&nbsp;</p><p><strong>Screenshots</strong></p><p>&nbsp;</p><p><strong><a href="http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=paint&amp;DownloadId=250084"><img title="Screen_HowToUse" src="http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=paint&amp;DownloadId=250085" alt="Screen_HowToUse" width="244" height="154" border="0"></a><a href="http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=paint&amp;DownloadId=250086"><img title="Paint_Screen1" src="http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=paint&amp;DownloadId=250087" alt="Paint_Screen1" width="244" height="154" border="0"></a><a href="http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=paint&amp;DownloadId=250090"><img title="Paint_Screen3" src="http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=paint&amp;DownloadId=250091" alt="Paint_Screen3" width="244" height="154" border="0"></a><a href="http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=paint&amp;DownloadId=250094"><img title="Paint_Screen5" src="http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=paint&amp;DownloadId=250095" alt="Paint_Screen5" width="244" height="154" border="0"></a><a href="http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=paint&amp;DownloadId=250096"><img title="Paint_Screen6" src="http://download.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=paint&amp;DownloadId=250097" alt="Paint_Screen6" width="244" height="154" border="0"></a></strong></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/coding4fun/rss&WT.dl=0&WT.entryid=Project:RSSView:07a4527eb7184c07a8689f04002cce04">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/projects/Kinect-Paint</comments>
      <link>http://channel9.msdn.com/coding4fun/projects/Kinect-Paint</link>
      <itunes:summary>Kinect Paint is a skeleton tracking application that allows you to become the paint brush!&amp;nbsp; This application uses the Kinect for Windows SDK and its skeletal tracking feature to create a painting experience.&amp;nbsp; Use several different tools, a simple color palette, and create a masterpiece!&amp;nbsp;Screenshots&amp;nbsp;</itunes:summary>
      <pubDate>Thu, 16 Jun 2011 16:23:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/projects/Kinect-Paint</guid>
      <dc:creator>Laurent Bugnion, Evan Lang, Stuart Mayhew</dc:creator>
      <category>kinect</category>
      <category>wpf</category>
  </item>    
</channel>
</rss>
