<?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>Channel 9 - Entries tagged with .Net Gadgeteer</title>
    <atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Tags/.net+gadgeteer/RSS"></atom:link>
    <itunes:summary></itunes:summary>
    <itunes:author>Microsoft</itunes:author>
    <itunes:subtitle></itunes:subtitle>
    <image>
      <url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
      <title>Channel 9 - Entries tagged with .Net Gadgeteer</title>
      <link>http://channel9.msdn.com/Tags/.net+gadgeteer</link>
    </image>
    <itunes:image href=""></itunes:image>
    <itunes:category text="Technology"></itunes:category>
    <description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
    <link>http://channel9.msdn.com/Tags/.net+gadgeteer</link>
    <language>en</language>
    <pubDate>Sat, 25 May 2013 18:03:04 GMT</pubDate>
    <lastBuildDate>Sat, 25 May 2013 18:03:04 GMT</lastBuildDate>
    <generator>Rev9</generator>
    <c9:totalResults>16</c9:totalResults>
    <c9:pageCount>1</c9:pageCount>
    <c9:pageSize>25</c9:pageSize>
  <item>
      <title>Every Gadgeteer&#39;s dream? A Gadgeteer Home Automation System</title>
      <description><![CDATA[<p>Today's Hardware Friday project by a friend of the blog, Marco Minerva, shows how he, and with his help, us, can build a cool home automation system with some of our favorite tools.</p><h2><a href="http://mikedodaro.net/2012/09/17/gadgeteer-home-automation-system/" target="_blank">Gadgeteer Home Automation System</a></h2><blockquote><p>In this post I want to describe how to create a Home Automation System that puts together many of the modules and source code we talked about on this blog during the past months. In particular,&nbsp; we’ll create a Gadgeteer device that uses touch screen capabilities of <a href="http://www.ghielectronics.com/catalog/product/276">Display T35</a> to provide access to all the functionalities of the system.</p><p>So, let’s start. Connect the following modules to a <a href="http://www.ghielectronics.com/catalog/product/269">FEZ Spider Mainboard</a>:</p><ul><li><a href="http://www.ghielectronics.com/catalog/product/280">USB ClientDP</a>; </li><li><a href="http://www.ghielectronics.com/catalog/product/282">WiFi RS21</a>, to retrieve current time from the Internet; </li><li><a href="http://www.ghielectronics.com/catalog/product/276">Display T35</a>, to manage the system using touch; </li><li><a href="http://www.ghielectronics.com/catalog/product/271">SD Card</a>, to store the configuration file of the application; </li><li><a href="http://www.ghielectronics.com/catalog/product/344">Temp &amp; Humidity</a>, to show an example of information that can be acquired using sensors; </li><li><a href="http://www.ghielectronics.com/catalog/product/327">Relays</a>, to control eletrical devices; </li><li><a href="http://www.ghielectronics.com/catalog/product/283">Camera</a>, with which we can show, for example, people that ring our bell. </li></ul><p>You can see the result in following screenshot.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B9%5D-25.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B3%5D-68.png" alt="image" width="315" height="265" border="0"></a></p><p>Almost all the FEZ Spider sockets are filled. As said before, we’ll use source code from some articles that have been published on this blog. In particular:</p><ul><li><a href="http://mikedodaro.net/2011/12/14/xml-configuration-files-for-net-micro-framework-applications-english/">XML Configuration Files for .NET Micro Framework</a> </li><li><a href="http://mikedodaro.net/2011/11/20/synchronize-the-clock-with-a-reference-server-on-the-internet-english/">Synchronize the Clock with a Reference Server on the Internet</a> </li><li><a href="http://mikedodaro.net/2011/11/18/windows-like-interface-for-the-net-gadgeteer-display-english/">Windows-like Interface for the .NET Gadgeteer Display</a> </li></ul><p>Moreover, we need to create some custom fonts for the application. .NET Micro Framework SDK provides a <a href="http://msdn.microsoft.com/en-us/library/cc533019.aspx">command line tool</a> that allows to do this. Alternatively, you can use the <a href="http://informatix.miloush.net/microframework/Utilities/TinyFontTool.aspx">Tiny Font Tool GUI</a> to make things simpler. In the ZIP file attached to this article you can find all the fonts we’ll use.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B3%5D-70.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B1%5D-95.png" alt="image" width="171" height="364" border="0"></a></p><p>...</p></blockquote><p>This project goes into all the details, from build the hardware, coding it and constructing the UI</p><blockquote><p>Our application has three sections: <em>Temperature &amp; Humidity</em>, <em>Relays</em> and <em>Camera</em>. So, we need to create three menu items:</p><p>&nbsp;</p><p>&nbsp;</p>The result is shown in the following screenshot. <p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B6%5D-53.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B2%5D-78.png" alt="image" width="502" height="384" border="0"></a></p></blockquote><p>Here's a video of it in action.</p><p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/e27-reYmXEg&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/e27-reYmXEg&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p><p>And as you would expect, the source available for download (<a href="http://mikedodaro.net/2012/09/17/gadgeteer-home-automation-system/" target="_blank">click through</a> and it's at the bottom of the page)</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/.net+gadgeteer/RSS&WT.dl=0&WT.entryid=Entry:RSSView:e34d7a5b9fd64610b31ca0e901723c21">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Every-Gadgeteers-dream-A-Gadgeteer-Home-Automation-System</comments>
      <itunes:summary>Today&#39;s Hardware Friday project by a friend of the blog, Marco Minerva, shows how he, and with his help, us, can build a cool home automation system with some of our favorite tools. Gadgeteer Home Automation SystemIn this post I want to describe how to create a Home Automation System that puts together many of the modules and source code we talked about on this blog during the past months. In particular,&amp;nbsp; we’ll create a Gadgeteer device that uses touch screen capabilities of Display T35 to provide access to all the functionalities of the system. So, let’s start. Connect the following modules to a FEZ Spider Mainboard: USB ClientDP; WiFi RS21, to retrieve current time from the Internet; Display T35, to manage the system using touch; SD Card, to store the configuration file of the application; Temp &amp;amp; Humidity, to show an example of information that can be acquired using sensors; Relays, to control eletrical devices; Camera, with which we can show, for example, people that ring our bell. You can see the result in following screenshot.  Almost all the FEZ Spider sockets are filled. As said before, we’ll use source code from some articles that have been published on this blog. In particular: XML Configuration Files for .NET Micro Framework Synchronize the Clock with a Reference Server on the Internet Windows-like Interface for the .NET Gadgeteer Display Moreover, we need to create some custom fonts for the application. .NET Micro Framework SDK provides a command line tool that allows to do this. Alternatively, you can use the Tiny Font Tool GUI to make things simpler. In the ZIP file attached to this article you can find all the fonts we’ll use.  ... This project goes into all the details, from build the hardware, coding it and constructing the UI Our application has three sections: Temperature &amp;amp; Humidity, Relays and Camera. So, we need to create three menu items: &amp;nbsp; &amp;nbsp; The result is shown in the following screenshot.  Here&#39;s a video of it in action.</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/Every-Gadgeteers-dream-A-Gadgeteer-Home-Automation-System</link>
      <pubDate>Fri, 19 Oct 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Every-Gadgeteers-dream-A-Gadgeteer-Home-Automation-System</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/9efa809c-af3e-4476-923e-41783f58f645.png" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/c1bb1ca2-d746-431b-85e3-82cd30f7a64e.png" height="166" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>1</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/Every-Gadgeteers-dream-A-Gadgeteer-Home-Automation-System/RSS</wfw:commentRss>
      <category>.NET Micro Framework</category>
      <category>C#</category>
      <category>Coding4Fun</category>
      <category>Home Automation</category>
      <category>.Net Gadgeteer</category>
    </item>
  <item>
      <title>Building a Windows Phone controlled Wi-Fi Gadgeteer Image Streaming Robot</title>
      <description><![CDATA[<p>Today's Hardware Friday project is another cool project from Marco Minerva, Friend of the Blog. This project brings so many things together that it could have been called the Kitchen Sink project... <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-4.gif?v=c9' alt='Tongue Out' /></p><h2><a href="http://mikedodaro.net/2012/07/10/wi-fi-gadgeteer-robot-controlled-by-windows-phone-with-image-streaming/" target="_blank">Wi-Fi Gadgeteer Robot controlled by Windows Phone with image streaming</a></h2><blockquote><p>I have upgraded the .NET Gadgeteer Robot I described in the post <a href="http://mikedodaro.net/2012/05/19/constructing-a-bluetooth-controlled-robot/">Constructing a Bluetooth controlled Robot</a>, replacing the <a href="http://www.ghielectronics.com/catalog/product/312">Bluetooth Module</a> with <a href="http://www.ghielectronics.com/catalog/product/282">Wi-Fi</a> and adding a <a href="http://www.ghielectronics.com/catalog/product/283">camera</a> to stream images. The result is a Robot that can be controlled by a Windows Phone application, with which it is also possible to show captured images.</p><p>Let’s start seeing the new Gadgeteer application, that uses the following modules connected to a <a href="http://www.ghielectronics.com/catalog/product/269">FEZ Spider Mainboard</a>:</p><ul><li><a href="http://www.ghielectronics.com/catalog/product/280">USB ClientDP</a>; </li><li><a href="http://www.ghielectronics.com/catalog/product/282">WiFi RS21</a>, to allow connections to the device; </li><li><a href="http://www.ghielectronics.com/catalog/product/272">Multicolor LED</a>, to indicate device status; </li><li><a href="http://www.ghielectronics.com/catalog/product/343">OLED Display</a>, to show the IP Address of the device; </li><li><a href="http://www.ghielectronics.com/catalog/product/315">Motor Driver L298</a> to control rover movements; </li><li><a href="http://www.ghielectronics.com/catalog/product/283">Camera</a>, to capture images. </li></ul><p>You can see the result in following screenshot.</p><p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/ono714-H8cg&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/ono714-H8cg&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B2%5D-67.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb-67.png" alt="image" width="558" height="407" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B5%5D-30.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B1%5D-74.png" alt="image" width="540" height="407" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B8%5D-32.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B2%5D-64.png" alt="image" width="185" height="303" border="0"></a></p></blockquote><p>From hardware to the phone app, it's all covered, including the challenges he faced.</p><blockquote><p>Getting and showing image streaming, instead, require a bit more work. First, we use <a href="http://restsharp.org/">RestSharp</a>, a library that simplifies the process of making requests via HTTP and processing responses in an asynchronous way. But then, we have a problem: Windows Phone doesn’t support BMP format, that is used by .NET Gadgeteer camera module. So, we need a way to load images in this format and convert them in a format that Windows Phone can handle (i.e., in PNG or JPEG). For this task, we’ll use <strong>ImageTools</strong>, that is available on <a href="http://imagetools.codeplex.com/">http://imagetools.codeplex.com</a>.</p><p>But there is another problem: if we try to read images that come from .NET Gadgeteer camera module with ImageTools, the height property is always negative. So, the read operation causes an exception. To solve this issue, I have downloaded the source code of ImageTools and applied a little hack to the library, in order to take the positive value of height. Doing so, the image is read correctly, but it appears flipped. This is the reason for which I have applied a <strong>ScaleTransform</strong> tranformation on image object in XAML, so that it is shown in the right direction. Of course, a better approach is to modify the code that reads the bitmap, but for the moment this solution is acceptable. As always, you can find the modified version of ImageTools library in the ZIP file that comes with this article.</p></blockquote><p>And of course the source is available, both used inline to explain how he built it;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML197f61b4%5B3%5D.png" target="_blank"><img title="SNAGHTML197f61b4" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML197f61b4_thumb.png" alt="SNAGHTML197f61b4" width="410" height="407" border="0"></a></p><p>As well as a the complete Visual Studio Solutions (<a href="http://mikedodaro.net/2012/07/10/wi-fi-gadgeteer-robot-controlled-by-windows-phone-with-image-streaming/" target="_blank">click through</a> for the download, at the bottom of the post).</p><p>If you're ready to create your own Wi-Fi networked and Windows Phone controlled robot head on over to the post, grab the projects and get building!</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/.net+gadgeteer/RSS&WT.dl=0&WT.entryid=Entry:RSSView:6d633290fcc84739a274a0a3014f6c58">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Building-a-Windows-Phone-controlled-Wi-Fi-Gadgeteer-Image-Streaming-Robot</comments>
      <itunes:summary>Today&#39;s Hardware Friday project is another cool project from Marco Minerva, Friend of the Blog. This project brings so many things together that it could have been called the Kitchen Sink project...  Wi-Fi Gadgeteer Robot controlled by Windows Phone with image streamingI have upgraded the .NET Gadgeteer Robot I described in the post Constructing a Bluetooth controlled Robot, replacing the Bluetooth Module with Wi-Fi and adding a camera to stream images. The result is a Robot that can be controlled by a Windows Phone application, with which it is also possible to show captured images. Let’s start seeing the new Gadgeteer application, that uses the following modules connected to a FEZ Spider Mainboard: USB ClientDP; WiFi RS21, to allow connections to the device; Multicolor LED, to indicate device status; OLED Display, to show the IP Address of the device; Motor Driver L298 to control rover movements; Camera, to capture images. You can see the result in following screenshot.     From hardware to the phone app, it&#39;s all covered, including the challenges he faced. Getting and showing image streaming, instead, require a bit more work. First, we use RestSharp, a library that simplifies the process of making requests via HTTP and processing responses in an asynchronous way. But then, we have a problem: Windows Phone doesn’t support BMP format, that is used by .NET Gadgeteer camera module. So, we need a way to load images in this format and convert them in a format that Windows Phone can handle (i.e., in PNG or JPEG). For this task, we’ll use ImageTools, that is available on http://imagetools.codeplex.com. But there is another problem: if we try to read images that come from .NET Gadgeteer camera module with ImageTools, the height property is always negative. So, the read operation causes an exception. To solve this issue, I have downloaded the source code of ImageTools and applied a little hack to the library, in order to take the positive value of height. Doing so, the ima</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/Building-a-Windows-Phone-controlled-Wi-Fi-Gadgeteer-Image-Streaming-Robot</link>
      <pubDate>Fri, 10 Aug 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Building-a-Windows-Phone-controlled-Wi-Fi-Gadgeteer-Image-Streaming-Robot</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/836f2a42-3e25-4b56-9bba-9cd4f5ef3e84.png" height="59" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/b0a5fc2e-d352-4b88-9e11-b34aee2c1c04.png" height="130" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>4</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/Building-a-Windows-Phone-controlled-Wi-Fi-Gadgeteer-Image-Streaming-Robot/RSS</wfw:commentRss>
      <category>.NET Micro Framework</category>
      <category>Coding4Fun</category>
      <category>.Net Gadgeteer</category>
    </item>
  <item>
      <title>How cool is this bus? Using the Service Bus to create a cloud enabled smart thermostat</title>
      <description><![CDATA[<p>Today's Hardware Friday post comes to us via MSDN Magazine and is an &quot;internet of things&quot; kind of project, meshing Azure with a smart thermostat (making it Smart&#43;&#43;? <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-5.gif?v=c9' alt='Wink' /></p><h2><a href="http://msdn.microsoft.com/en-us/magazine/jj190807.aspx" target="_blank">A Smart Thermostat on the Service Bus</a></h2><blockquote><p>Here’s a bold prediction: Connected devices are going to be big business, and understanding these devices will be really important for developers not too far down the road. “Obviously,” you say. But I don’t mean the devices on which you might read this article. I mean the ones that will keep you cool this summer, that help you wash your clothes and dishes, that brew your morning coffee or put together other devices on a factory floor.</p><p>In the June issue of MSDN Magazine (<a href="http://msdn.microsoft.com/magazine/jj133825">msdn.microsoft.com/magazine/jj133825</a>), I explained a set of considerations and outlined an architecture for how to manage event and command flows from and to embedded (and mobile) devices using Windows Azure Service Bus. In this article, I’ll take things a step further and look at code that creates and secures those event and command flows. And because a real understanding of embedded devices does require looking at one, I’ll build one and then wire it up to Windows Azure Service Bus so it can send events related to its current state and be remotely controlled by messages via the Windows Azure cloud.</p><p>Until just a few years ago, building a small device with a power supply, a microcontroller, and a set of sensors required quite a bit of skill in electronics hardware design as well as in putting it all together, not to mention good command of the soldering iron. I’ll happily admit that I’ve personally been fairly challenged in the hardware department—so much so that a friend of mine once declared if the world were attacked by alien robots he’d send me to the frontline and my mere presence would cause the assault to collapse in a grand firework of electrical shorts. But due to the rise of prototyping platforms such as Arduino/Netduino or .NET Gadgeteer, even folks who might do harm to man and machine swinging a soldering iron can now put together a fully functional small device, leveraging existing programming skills.</p><p>To stick with the scenario established in the last issue, I’ll build an “air conditioner” in the form of a thermostat-controlled fan, where the fan is the least interesting part from a wiring perspective. The components for the project are based on the .NET Gadgeteer model, involving a mainboard with a microcontroller, memory and a variety of pluggable modules. The mainboard for the project is a GHI Electronics FEZ Spider board with the following extension modules:</p><ul><li>From GHI Electronics <ul><li>Ethernet J11D Module to provide wired networking (a Wi-Fi module exists) </li><li>USB Client DP Module as power supply and USB port for deployment </li><li>Joystick for direct control of the device </li></ul></li><li>From Seeed Studio <ul><li>Temperature and humidity sensor </li><li>Relays to switch the fan on or off </li><li>OLED display to show the current status </li></ul></li></ul><p>Together, these parts cost around $230. That’s obviously more than soldering equivalent components onto a board, but did I mention that would require soldering? Also, this is a market that’s just starting to get going, so expect prices to go down as the base broadens.</p><p>...</p><h4>Thermostat Functionality</h4><p>Implementing local thermostat functionality for this sample is pretty straightforward. I’ll check temperature and humidity on a schedule using the sensor and switch the fan connected via one of the relay ports off or on when the temperature drops below or rises above a certain threshold. The current status is displayed on the OLED screen and the joystick allows adjusting the target temperature manually.</p><p>...</p><h4>Provisioning</h4><p>In the beginning, the device is in “factory new” state—the device code has been deployed but the device hasn’t yet been initialized and therefore doesn’t have any current settings. You can see this state reflected in the GetSettings method when the settings object is still null and is therefore initialized with default settings.</p><p>Because I want to let the device communicate with and through an Internet infrastructure—Windows Azure Service Bus—I need to equip the device with a set of credentials to talk to that infrastructure and also tell it which resources to talk to. That first step of setting up a factory new device with the required network configuration and setting up the matching resources on the server side is known as provisioning; I discussed the basic architectural model for it in the previous article.</p><p>...</p><h4>Sending Events and Receiving Commands</h4><p>With provisioning completed, the device is now ready to send events to the Windows Azure Service Bus events Topic and to receive commands from its subscription to the devices Topic. But before I go there, I have to discuss a sensitive issue: security.</p><p>As I mentioned earlier, SSL/TLS is an expensive protocol suite for small devices. That is to say, some devices won’t ever be able to support SSL/TLS, or they might support it only in a limited fashion because of compute capacity or memory constraints. As a matter of fact, though at the time of this writing the GHI Electronics FEZ Spider mainboard based on the .NET Micro Framework 4.1 I’m using here can nominally speak SSL/TLS and therefore HTTPS, its SSL/TLS firmware apparently can’t deal with the certificate chain presented to it by Windows Azure Service Bus or the Access Control service. As the firmware for these devices gets updated to the new 4.2 version of the .NET Micro Framework, these limitations will go away for this particular device, but the issue that some devices are simply too constrained to deal with SSL/TLS remains true in principle, and there’s active discussion in the embedded device community on appropriate protocol choices that aren’t quite as heavyweight.</p><p>...</p><h4>Wrapping Up</h4><p>The goal of this series on the Internet of Things is to provide some insight into the kinds of technologies we’re working on here at Microsoft to enable connected-device prototyping and development. We also want to show how cloud technologies such as Windows Azure Service Bus and analytics technologies such as StreamInsight can help you manage the data flow from and to connected devices; how you can create large-scale cloud architectures for handling a great many devices; and how to aggregate and digest information from them.</p><p>On the way, I built an embedded device that you can place on any home network and control remotely from any other network, which is pretty cool if you ask me.</p><p>I believe we’re in the very early stages of this journey. In talking to Microsoft customers from all over, I’ve seen that a huge wave of connected and custom-built devices is on the way, and this is a great opportunity for .NET developers and innovative companies looking to build cloud offerings to connect to these devices and to combine them with other connected assets in inventive ways. Let’s see what you can do.</p></blockquote><p>As you would expect, the source for the project is available <a href="http://archive.msdn.microsoft.com/mag201207IOT" target="_blank">here</a>. Here's a snap of the Solution.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B3%5D-60.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B1%5D-72.png" alt="image" width="330" height="171" border="0"></a></p><p>What's the story behind all these Projects? RTFR (Reading The Fine Readme <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-5.gif?v=c9' alt='Wink' /></p><blockquote><p>Code Artifacts:</p><p>The solution contains several directories and sub-projects:</p><p>/AzureBackend – This is the Windows Azure deployment project for the cloud backend service.</p><p>/BackendRoleTest – This is a very simple one-shot command line test to talk to the provisioning endpoint, configured to talk to the local dev-fabric.</p><p>/BackendWebRole – This is the backend web role hosting the Provisioning.svc endpoint as well as the Passthrough.svc custom-gateway endpoint implementing a simple hash-based model as a replacement for SSL to be used alternatively to talking directly to Service Bus.<br>&nbsp;<br>In the web.config file you will find the following &lt;appSettings&gt;<br>*&nbsp; sharedSignature – replace the value with a base64 encoded 256-bt (16 byte) random binary key or with the same value as ‘managementKey’ below. This is the shared signing key used for the non-SSL scenario.<br>* serviceBusNamespace – replace the value with the name of a Service Bus namespace you provisioned. Just use the prefix (i.e. myownnamespace) and not the .servicebus.windows.net suffix. As you create the namespace in the Windows Azure Portal, you should create two Topics, named ‘devices’ and ‘events in that namespace.<br>* managementKey – replace the value with the ‘owner’ key of the Service Bus namespace, which you can also obtain from the portal.</p><p>/Microsoft.ServiceBus.AccessControlExtensions – This is a set of utility classes for managing Service Bus Access Control taken from the Windows Azure Service Bus SDK ‘Authorization’ scenario sample</p><p>/Microsoft.ServiceBus.Micro – This is a .NET Micro Framework client for Service Bus implementing Send and Receive operations and token acquisition from ACS over HTTPS and the alternative non-SSL model that’s using the Passthrough.svc gateway included in this sample. It also includes a SHA-256 implementation by Elze Kool (<a href="http://www.microframework.nl/2009/09/05/shahmac-digest-class/)">http://www.microframework.nl/2009/09/05/shahmac-digest-class/)</a> and an NTP client written by Michael Schwarz from <a href="https://mschwarztoolkit.svn.codeplex.com/">https://mschwarztoolkit.svn.codeplex.com/</a> which is included under its own license as expressed in the file.</p><p>/ServiceBusApp – is the actual Air Conditioner code for .NET Gadgeteer requitring the setup explained in the article. The ‘serverAddress’ in Program.cs must be set to the deployment location of the backend web role. This application will only function when run on the actual hardware.</p><p>/ServiceBusMicroTest – is small test app to run in the .NET Micro Framework emulator to call the provisioning logic and send/receive messages.</p></blockquote><p>Also in the readme are additional URL's if you don't have the .NET Gadgeteer SDK installed or need an Azure account.</p><p>If you're been wondering what it would take to create a &quot;smart, internet of things&quot; kind of device, are interested in see how a .NET Gadgeteer can talk to Azure, or interested in building interconnected devices and service using the power of the Service Bus, this article and source is just a quick click away...</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/.net+gadgeteer/RSS&WT.dl=0&WT.entryid=Entry:RSSView:ceeb698f6478422f9a25a09c01672fcc">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/How-cool-is-this-bus-Using-the-Service-Bus-to-create-a-cloud-enabled-smart-thermostat</comments>
      <itunes:summary>Today&#39;s Hardware Friday post comes to us via MSDN Magazine and is an &amp;quot;internet of things&amp;quot; kind of project, meshing Azure with a smart thermostat (making it Smart&amp;#43;&amp;#43;?  A Smart Thermostat on the Service BusHere’s a bold prediction: Connected devices are going to be big business, and understanding these devices will be really important for developers not too far down the road. “Obviously,” you say. But I don’t mean the devices on which you might read this article. I mean the ones that will keep you cool this summer, that help you wash your clothes and dishes, that brew your morning coffee or put together other devices on a factory floor. In the June issue of MSDN Magazine (msdn.microsoft.com/magazine/jj133825), I explained a set of considerations and outlined an architecture for how to manage event and command flows from and to embedded (and mobile) devices using Windows Azure Service Bus. In this article, I’ll take things a step further and look at code that creates and secures those event and command flows. And because a real understanding of embedded devices does require looking at one, I’ll build one and then wire it up to Windows Azure Service Bus so it can send events related to its current state and be remotely controlled by messages via the Windows Azure cloud. Until just a few years ago, building a small device with a power supply, a microcontroller, and a set of sensors required quite a bit of skill in electronics hardware design as well as in putting it all together, not to mention good command of the soldering iron. I’ll happily admit that I’ve personally been fairly challenged in the hardware department—so much so that a friend of mine once declared if the world were attacked by alien robots he’d send me to the frontline and my mere presence would cause the assault to collapse in a grand firework of electrical shorts. But due to the rise of prototyping platforms such as Arduino/Netduino or .NET Gadgeteer, even folks who might do harm to ma</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/How-cool-is-this-bus-Using-the-Service-Bus-to-create-a-cloud-enabled-smart-thermostat</link>
      <pubDate>Fri, 03 Aug 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/How-cool-is-this-bus-Using-the-Service-Bus-to-create-a-cloud-enabled-smart-thermostat</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/608911c4-5035-4155-9735-baf0586004a0.png" height="74" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/5c7bdc5e-1b11-4b64-8c83-b76a4b12bb94.png" height="162" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/How-cool-is-this-bus-Using-the-Service-Bus-to-create-a-cloud-enabled-smart-thermostat/RSS</wfw:commentRss>
      <category>.NET Micro Framework</category>
      <category>Azure</category>
      <category>C#</category>
      <category>Coding4Fun</category>
      <category>Service Bus</category>
      <category>.Net Gadgeteer</category>
    </item>
  <item>
      <title>Keeping an eye it with an object tracking .Net Gadgeteer robot</title>
      <description><![CDATA[<p>Today's Hardware Friday brings a new face to the blog, someone I've not highlighted before, but someone I believe we'll see more of in the future. Today's project is</p><h2><a href="http://letsmakerobots.com/node/32746" target="_blank">.Net Gadgeteer Powered Object Tracking Robot</a></h2><blockquote><p>This is a .Net Gadgeteer powered robot based on the rover 5 platform, and using an ir compound eye for object tracking.</p><p>It's the first robot i've ever build and also my first real project with the Gadgeteer platform.</p><p>I started off with some code based on the arduino sample code for Mr General from the <a href="https://sites.google.com/site/daguproducts/home/download-page">dagu code sample site</a> which i converted into c#. I then refactored it to make it more object oriented and tweaked stuff to make it work better with the .Net Gadgeteer platform</p><p>Details and example code can be found on my blog ...</p></blockquote><h3><a href="http://3amcode.blogspot.co.uk/2012/05/net-gadgeteer-powered-object-tracking.html" target="_blank">.Net Gadgeteer Powered Object Tracking Robot</a></h3><blockquote><p>This is my first real project using the awesome .Net gadgeteer platform. My initial aim for this project was to build a Gadgeteer version of the robot shown in this video.</p><p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/HR-eO_szLCk&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/HR-eO_szLCk&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p><p>The robot can track objects at short (around 20-30cm) distances and will try to stay a set distance away from the object it is tracking.</p><p>For tracking the robot uses an <a href="http://letsmakerobots.com/node/11293">ir compound eye</a>, which is a sensor that gives an analog output depending on the level of reflected infrared light.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B2%5D-64.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb-64.png" alt="image" width="545" height="407" border="0"></a></p><p>This is a video of the working prototype of my gadgeteer powered version. (apologies for the crappy quality, i'll get a better version uploaded soon)</p><p>This is the first of a series of posts detailing how i went about building it and the <strike>stupid</strike> expensive mistakes i made along the way.</p><h4>Parts and materials</h4><p>The base of the robot is a <a href="http://www.pololu.com/catalog/product/1551">Rover 5 chassis</a>, made by Dagu electronics.</p><p>I had a couple of different options for the motor controller. GHI electronics make a <a href="http://www.ghielectronics.com/catalog/product/315">Gadgeteer motor driver module</a>, which i could have used and would probably have worked perfectly well.</p><p>However i chose the <a href="http://robosavvy.com/store/product_info.php/products_id/2083">Dagu explorer pcb</a> as it was designed to fit the chassis i was using and has lots of other nice features such as infrared corner tracking and multiple power sources.</p><ul><li><a href="http://www.robotshop.com/dagu-compound-infrared-sensor-3.html">Dagu ir compound eye</a> for object tracking </li><li><a href="http://www.robotshop.com/dagu-mini-pan-and-tilt-kit.html">Pan and tilt kit</a> </li><li><a href="http://www.ghielectronics.com/catalog/product/269">Fez Spider mainboard</a> (you can probably use most other gadgeteer mainboards) </li><li><a href="http://www.ghielectronics.com/catalog/product/280">Gadgeteer Power Module</a> </li><li><a href="http://www.ghielectronics.com/catalog/product/273">4 Gadgeteer Extender Modules</a> </li></ul><p>Future posts will detail how i went about putting it together.</p><ul><li><a href="http://3amcode.blogspot.co.uk/2012/05/gadgeteer-robot-driving-motors.html">Driving the motors</a> </li><li><a href="http://3amcode.blogspot.co.uk/2012/05/net-gadgeteer-object-tracking-using-ir.html">Object Tracking</a> </li></ul></blockquote><p>As you can see above, Rik dives into the project breaking it into manageable and understandable pieces. He's also using this project as a basis for others, like...</p><h3><a href="http://3amcode.blogspot.co.uk/2012/07/vita-controlled-gadgeteer-robot.html" target="_blank">.Net Gadgeteer Robot with PS Vita as controller</a></h3><blockquote><p>This post is about a modification of my <a href="http://3amcode.blogspot.co.uk/2012/05/net-gadgeteer-powered-object-tracking.html">.Net Gadgeteer object tracking robot</a>.</p><p>The aim of the project was to add a robotic arm to the robot and allow control over wifi using my Playstation Vita.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B5%5D-28.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B1%5D-70.png" alt="image" width="545" height="407" border="0"></a></p><p>I had picked up a Playstation Vita a few months back and was really excited when I heard about the <a href="http://www.playstation.com/psm/developer">Playstation Mobile Developer Program</a> because it would allow me to write code for the vita in c#</p><p>After building my <a href="http://3amcode.blogspot.co.uk/2012/05/net-gadgeteer-powered-object-tracking.html">object tracking robot</a>, i thought it would be an interesting challenge to try and control it using the vita.</p><p>The robot uses the same Rover 5 chassis and explorer pcb motor controller as the original robot.</p><p>Here's a couple of videos of him in action.</p><p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/k9-7bwB162M&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/k9-7bwB162M&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p><p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/IakfYFDwMvA&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/IakfYFDwMvA&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p><p>The parts i used to build this robot were as follows.</p><ul><li>Fez Spider Mainboard </li><li>2 Gadgeteer Extender Modules </li><li>Gadgeteer Ethernet Module </li><li>Gadgeteer Client DP Module </li><li>Dagu 2dof Robotic Arm </li><li>Dagu Rover 5 Chassis </li><li>Dagu Explorer PCB </li><li>Edimax Portable Router </li></ul><p>I'm using a Playstation Vita as the controller for this robot, however you could really use any wifi capable device that you can write a socket client for.</p><p>...</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B8%5D-30.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B2%5D-59.png" alt="image" width="449" height="407" border="0"></a></p><p>...</p></blockquote><p>Where's the code? Most of his posts include all the code required, including this one...</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML19f67038%5B3%5D.png" target="_blank"><img title="SNAGHTML19f67038" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML19f67038_thumb.png" alt="SNAGHTML19f67038" width="448" height="407" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML19f778c0%5B3%5D.png" target="_blank"><img title="SNAGHTML19f778c0" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML19f778c0_thumb.png" alt="SNAGHTML19f778c0" width="408" height="407" border="0"></a></p><p>Code, parts, concepts and ideas. All there waiting for you to use and extend in your own projects...</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/.net+gadgeteer/RSS&WT.dl=0&WT.entryid=Entry:RSSView:a2bb459e21434fd88e21a095013e7090">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Keeping-an-eye-it-with-an-object-tracking-Net-Gadgeteer-robot</comments>
      <itunes:summary>Today&#39;s Hardware Friday brings a new face to the blog, someone I&#39;ve not highlighted before, but someone I believe we&#39;ll see more of in the future. Today&#39;s project is .Net Gadgeteer Powered Object Tracking RobotThis is a .Net Gadgeteer powered robot based on the rover 5 platform, and using an ir compound eye for object tracking. It&#39;s the first robot i&#39;ve ever build and also my first real project with the Gadgeteer platform. I started off with some code based on the arduino sample code for Mr General from the dagu code sample site which i converted into c#. I then refactored it to make it more object oriented and tweaked stuff to make it work better with the .Net Gadgeteer platform Details and example code can be found on my blog ... .Net Gadgeteer Powered Object Tracking RobotThis is my first real project using the awesome .Net gadgeteer platform. My initial aim for this project was to build a Gadgeteer version of the robot shown in this video.  The robot can track objects at short (around 20-30cm) distances and will try to stay a set distance away from the object it is tracking. For tracking the robot uses an ir compound eye, which is a sensor that gives an analog output depending on the level of reflected infrared light.  This is a video of the working prototype of my gadgeteer powered version. (apologies for the crappy quality, i&#39;ll get a better version uploaded soon) This is the first of a series of posts detailing how i went about building it and the stupid expensive mistakes i made along the way. Parts and materialsThe base of the robot is a Rover 5 chassis, made by Dagu electronics. I had a couple of different options for the motor controller. GHI electronics make a Gadgeteer motor driver module, which i could have used and would probably have worked perfectly well. However i chose the Dagu explorer pcb as it was designed to fit the chassis i was using and has lots of other nice features such as infrared corner tracking and multiple power sources. Dagu ir comp</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/Keeping-an-eye-it-with-an-object-tracking-Net-Gadgeteer-robot</link>
      <pubDate>Fri, 27 Jul 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Keeping-an-eye-it-with-an-object-tracking-Net-Gadgeteer-robot</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/10afc7bf-8c32-47c4-8d4b-4c90e34677aa.png" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/18583e37-e9d6-4091-8381-23e44c3845df.png" height="164" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>1</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/Keeping-an-eye-it-with-an-object-tracking-Net-Gadgeteer-robot/RSS</wfw:commentRss>
      <category>.NET Micro Framework</category>
      <category>Coding4Fun</category>
      <category>.Net Gadgeteer</category>
    </item>
  <item>
      <title>A steaming hot .NET Gadgeteer project, the steampunk weather station</title>
      <description><![CDATA[<p>Today's Hardware Friday post is a .Net Gadgeteer project that given the recent weather in the States, I thought weirdly appropriate.</p><h2><a href="http://blogs.msdn.com/b/pierreca/archive/2012/07/11/prototyping-a-connected-object-using-the-net-gadgeteer-the-example-of-a-steampunk-meteo-station.aspx" target="_blank">Prototyping a connected object using the .NET Gadgeteer: the example of a steampunk meteo station</a></h2><blockquote><p>For years I’ve had this very old voltmeter I wanted to do something with: I liked the beautiful wooden case, the leather strap, but honestly, I had better tools for my day to day electronics experiments. I found a purpose for it when I started experimenting with the .NET Gadgeteer kit, and one of my first prototype of connected object: a simple meteo station that would measure temperature, humidity and pressure and upload data to a feed in Cosm, formerly known as Pachube, which is a connected objects web platform used to publish and consume realtime data. I had two goals with this project: have fun with the .NET Gadgeteer kits, and experiment on a complete connected object prototyping cycle (I’m not going to talk about industrialization or mass production here).</p><p>Here’s the plan:</p><ol><li>Discovering the .NET Gadgeteer tooling, and interfacing with sensors </li><li>Connecting to Cosm (Pachube) </li><li>Creating the steampunk GUI </li><li>Making the meteo station user-configurable using a small webserver </li><li>Prototyping the finished design using 3D modeling tools </li></ol></blockquote><p>While this article reads fine on the web, it's also available as a Word Document <a href="https://skydrive.live.com/redir?resid=1544E7C8D3F81201!3361">here.</a>&nbsp;</p><p>The article delves into each of the above areas, providing a number of code snips and related resources. Frist the hardware is covered.</p><blockquote><h5>Discovering the .NET Gadgeteer tooling, and interfacing with sensors</h5><p>The .NET Gadgeteer is a rapid prototyping environment for connected objects. Kits are manufactured by Microsoft partners, like GHI Electronics (<a href="http://www.ghielectronics.com">http://www.ghielectronics.com</a>), Seed Studio (<a href="http://www.seeedstudio.com/depot/">http://www.seeedstudio.com/depot/</a>), or the Mountaineer Group (<a href="http://www.mountaineer.org/">http://www.mountaineer.org/</a>). The core libraries (based on the .NET Micro Framework: (<a href="http://www.netmf.com)/">http://www.netmf.com)</a>) are maintained by Microsoft and the community, while the hardware specific drivers and updaters are maintained by the different partner.</p><p>Therefore, there are 3 different packages to install on top of Visual Studio 2010 (any version, Express will do) to install the .NET Gadgeteer tools: the .NET Micro Framework base, the Gadgeteer Core, and the hardware specific SDK. In our case, we are going to use a FEZ Spider Kit from GHI Electronics as well as a couple of sensors and a Wifi module.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B2%5D-61.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb-61.png" alt="image" width="650" height="353" border="0"></a></p></blockquote><p>Then each code section;</p><blockquote><h5>Connecting to Cosm</h5><p>Before connecting to Cosm, we need to connect to a network. GHI Electronics offer different modules, we’ll talk about the Wifi Module, and the Ethernet (J11D) module .When purchasing anyone of them, pay attention that there are different references depending on the motherboard you’re using. Read the docs!</p><p>The Ethernet module is the easier to program: here’s the code to connect to a network using DHCP:</p><pre>ethernet.NetworkSettings.EnableDhcp();</pre><pre>&nbsp;</pre><p>The static equivalent:</p><pre>ethernet.NetworkSettings.EnableStaticIP(&quot;192.168.0.10&quot;, &quot;255.255.255.0&quot;, &quot;192.168.0.1&quot;);string[] dnsServers = { &quot;192.168.0.1&quot;, &quot;192.168.0.2&quot; };ethernet.NetworkSettings.EnableStaticDns(dnsServers); </pre><p>There are a couple of events you can subscribe to be notified about Network changes:</p><pre>ethernet.NetworkDown &#43;= new GTM.Module.NetworkModule.NetworkEventHandler(ethernet_NetworkDown);ethernet.NetworkUp &#43;= new GTM.Module.NetworkModule.NetworkEventHandler(ethernet_NetworkUp);</pre><pre>&nbsp;</pre><p>The Wifi module is also very straightforward to configure: you are going to use the same code, only you need to join a network first:</p><pre>WiFi_RS21.WiFiNetworkInfo wifiInfo = wifi.Search(&quot;&lt;SSID&gt;&quot;);wifi.Join(wifiInfo, &quot;&lt;KEY&gt;&quot;);</pre><pre>&nbsp;</pre><p>The second step is to set the system time. Since there’s no “backup” battery that saves the clock time, one has to set it everytime the system is powered. This is done with a small NTP library called MicroNTP extracted from the Micro Framework Toolkit: <a href="http://mftoolkit.codeplex.com/">http://mftoolkit.codeplex.com/</a></p><pre>DateTime UtcTime = NtpClient.GetNetworkTime(&quot;0.fr.pool.ntp.org&quot;);Microsoft.SPOT.Hardware.Utility.SetLocalTime(UtcTime &#43; new TimeSpan(TimeSpan.TicksPerHour * 2));</pre><pre>&nbsp;</pre><p>The NTP server returns the Coordinated Universal Time (UTC) therefore I add the timezone difference (&#43;2H, hardcoded here for readability reasons, it would have to be a system parameter, we’ll see later how to create a settings system.</p></blockquote><blockquote><h5>Creating the Steampunk GUI : reading and displaying images from the SD Card, and charting data.</h5><p>There are two ways to create a user interface using the .NET Micro Framework. Either using the very small subset of WPF, or, a bit like a game, create a display loop and use graphical elements and fonts, just like a game. In my case, I really want my interface to have a steampunk feeling so I’m going to use a lot of images. Since it will be sealed in a box, I have no need for touch interactions, so I’m going to go for the game-like approach. I’ll have a timer that will regularly draw all images, in the right order and at the right place, depending on the various data I have. The only “non-image” data that I’m going to display is a graph, and for that all I need is a SetPixel() method. It’s very easy.</p></blockquote><blockquote><h5>Building a webserver and configuration interface within the meteo station</h5><p>There’s a sample project for .NET Micro Framework that works great, but the .NET gadgeteer makes it even simpler: there’s a WebServer class already included, with basic routing functionalities. We’re going to use it. We will store the HTML files on the SD Card, as well as a configuration file.</p><p>Starting a WebServer is as simple as one line of code:</p><pre>WebServer.StartLocalServer(ethernet.NetworkSettings.IPAddress, 80);</pre><p>To configure routing (i.e. associate code execution with specific URLs), use the WebEvent class:</p><pre>WebEvent webevt = WebServer.SetupWebEvent(&quot;Settings.htm&quot;);webevt.WebEventReceived &#43;= new WebEvent.ReceivedWebEventHandler(webevt_WebEventReceived);</pre><p>Once the webevent is configured, calling “<a href="http://ip:port/Settings.htm">http://ip:port/Settings.htm</a>” will automatically trigger the execution of the handler associated with the string “Settings.htm”. What we need to do in the handler, is therefore to return, as an HTTP response, the content of the Settings.htm file.</p></blockquote><blockquote><h5>Conclusion</h5><p>In this article, we’ve gone through the process of prototyping every function of a connected object, from the sensors, to the network, and configuration. Hopefully you now understand:</p><ul><li>How to use the .NET Gadgeteer tooling </li><li>How to connect sensors, and get data from them </li><li>How to work with different kind of files on the SD Card </li><li>How to build a simple user interface </li><li>How to post them on the network </li><li>How to interface with Cosm </li><li>How to buld a webserver in your object </li><li>How to build a configuration mechanism </li></ul><p>We also made use of a few toolkits (mftoolkit, HttpUtility, Pachube DAL, etc) that will hopefully help you, and concluded on the possibility to use CAD tools to physically design the object around the 3D models of the gadgeteer components. Now it’s your turn to build something!</p></blockquote><p>In the end, there's a cool little steampunk weather station...</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B8%5D-28.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B2%5D-56.png" alt="image" width="343" height="407" border="0"></a></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/.net+gadgeteer/RSS&WT.dl=0&WT.entryid=Entry:RSSView:e45a08adea444c9887b2a08e013e6794">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/A-steaming-hot-NET-Gadgeteer-project-the-steampunk-weather-station</comments>
      <itunes:summary>Today&#39;s Hardware Friday post is a .Net Gadgeteer project that given the recent weather in the States, I thought weirdly appropriate. Prototyping a connected object using the .NET Gadgeteer: the example of a steampunk meteo stationFor years I’ve had this very old voltmeter I wanted to do something with: I liked the beautiful wooden case, the leather strap, but honestly, I had better tools for my day to day electronics experiments. I found a purpose for it when I started experimenting with the .NET Gadgeteer kit, and one of my first prototype of connected object: a simple meteo station that would measure temperature, humidity and pressure and upload data to a feed in Cosm, formerly known as Pachube, which is a connected objects web platform used to publish and consume realtime data. I had two goals with this project: have fun with the .NET Gadgeteer kits, and experiment on a complete connected object prototyping cycle (I’m not going to talk about industrialization or mass production here). Here’s the plan: Discovering the .NET Gadgeteer tooling, and interfacing with sensors Connecting to Cosm (Pachube) Creating the steampunk GUI Making the meteo station user-configurable using a small webserver Prototyping the finished design using 3D modeling tools While this article reads fine on the web, it&#39;s also available as a Word Document here.&amp;nbsp; The article delves into each of the above areas, providing a number of code snips and related resources. Frist the hardware is covered. Discovering the .NET Gadgeteer tooling, and interfacing with sensorsThe .NET Gadgeteer is a rapid prototyping environment for connected objects. Kits are manufactured by Microsoft partners, like GHI Electronics (http://www.ghielectronics.com), Seed Studio (http://www.seeedstudio.com/depot/), or the Mountaineer Group (http://www.mountaineer.org/). The core libraries (based on the .NET Micro Framework: (http://www.netmf.com)) are maintained by Microsoft and the community, while the hardware specific </itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/A-steaming-hot-NET-Gadgeteer-project-the-steampunk-weather-station</link>
      <pubDate>Fri, 20 Jul 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/A-steaming-hot-NET-Gadgeteer-project-the-steampunk-weather-station</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/88bde67d-6483-4451-8ce5-33fcf3d17605.png" height="100" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/af2651b1-5133-454d-866a-442784a72fe7.png" height="220" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/A-steaming-hot-NET-Gadgeteer-project-the-steampunk-weather-station/RSS</wfw:commentRss>
      <category>C#</category>
      <category>Coding4Fun</category>
      <category>.Net Gadgeteer</category>
    </item>
  <item>
      <title>Michael makes a beeline to some Mayhem with the .Net Gadgeteer and XBee</title>
      <description><![CDATA[<p>Today's Hardware Friday post is an example of how we can make mesh our software and hardware worlds, all the while taking advantage of plug-and-play like features. <a href="http://mikedodaro.net/" target="_blank">Michael Dodaro</a>, friend of the blog shows us how we take the Plug-and-play features of Mayhem and hook them up to the plug-and-play hardware features of the .Net Gadgeteer platform...</p><h2><a href="http://mikedodaro.net/2012/06/21/making-mayhem-with-net-gadgeteer/" target="_blank">Making Mayhem with .NET Gadgeteer</a></h2><blockquote><p><a href="http://makemayhem.com/">Mayhem</a> is an open source application that supports triggers, events, and reactions. The core <strong>Mayhem</strong> application runs on a PC, but the events and reactions it uses are interoperable with just about any platform or device. The guys making <strong>Mayhem </strong>say that non-programmers can use it to automate <em>anything!</em> This seems an invitation to try <strong>Mayhem</strong> with <strong>.NET Gadgeteer</strong>.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B6%5D-42.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B2%5D-52.png" alt="image" width="500" height="294" border="0"></a></p><p>Creating events and reactions that run with <strong>Mayhem</strong> is not difficult after a look at the <a href="http://mayhem.codeplex.com/documentation">API Reference</a>, which explains methods to override. The example implemented in this article requires a static class in order to use a single instance of Paul Mineau’s <a href="http://xbeeclient.codeplex.com/">XBeeClient</a>. The <strong>XBeeClient </strong>is a driver for <strong>XBee radios</strong>. It provides a serial interface that services two events. <strong>Mayhem</strong> persists state information when the events are turned off or <strong>Mayhem</strong> is shut down.</p></blockquote><p>As you might expect, the post not only provides a short introduction to Mayhem but how to integrate it with a .NET Gadgeteer project.</p><blockquote><p><strong>.NET Gadgeteer Devices Automated by Mayhem Events and Reactions</strong></p><p>Embedded microcontroller devices often run without an operating system, and they communicate with PCs in various ways. Mayhem <strong>EventBase</strong> and <strong>ReactionBase</strong> classes can automate <strong>.NET Gadgeteer</strong> devices as in the example we’re building, which uses <strong>XBee</strong> radio communication to and from a device. The device uses <strong>.NET Gadgeteer</strong> compatible <a href="http://www.ghielectronics.com/catalog/product/336">GHI Electronics Light Sensor </a>and <a href="http://www.seeedstudio.com/depot/relay-module-net-gadgeteer-compatible-p-967.html?cPath=203">Seeed Relay </a>modules and the <a href="http://www.ghielectronics.com/catalog/product/314">.NET Gadgeteer XBee adapter</a> for <strong>XBee</strong> radio communication.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B7%5D-23.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B3%5D-48.png" alt="image" width="465" height="364" border="0"></a></p><p>The relay module in this device can control AC electrical circuits that use power up to 15 Amps/120 Volts or 7 Amps/250 Volts. The light sensor is an analog device. <strong>Mayhem</strong> automation of this device includes events that originate on the device and events that originate on the PC.<strong> Paul Mineau</strong> wrote the <a href="http://xbeeclient.codeplex.com/">XBeeClient open-source driver </a>, available on <strong>CodePlex</strong>, that runs the XBees.</p><p>The code behind this hardware sets up the device so <strong>Mayhem</strong> can automate its modules. The code runs the <strong>XBeeClient</strong> to communicate with the PC hosting <strong>Mayhem</strong>. It runs a timer that reads the <strong>Light Sensor </strong>at 10 second intervals and sends notifications when the sensor detects light greater than 92.00 percent of maximum. It toggles the <strong>Relay</strong> that reacts to <strong>Mayhem</strong> automation events.</p></blockquote><p>The post includes Mike's entire module as well;</p><blockquote><h5>Complete code for both Mayhem modules</h5><p>We’ve discussed all the elements of a <strong>Mayhem</strong>/ <strong>.NET Gadgeteer</strong> implementation. This is a basic example, but adaptable in many ways. The <strong>Mayhem</strong> vision is to connect everything to everything else.</p><p><a href="http://mikedodaro.net/2012/06/21/making-mayhem-with-net-gadgeteer/" target="_blank"><img title="SNAGHTML37bec16f" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML37bec16f%5B4%5D.png" alt="SNAGHTML37bec16f" width="540" height="407" border="0"></a></p></blockquote><p>Here’s a few more links you might find interesting:</p><ul><li><a href="http://channel9.msdn.com/coding4fun/blog/To-XBee-or-not-XBee">To XBee or not XBee...</a> </li><li><a href="http://channel9.msdn.com/coding4fun/kinect/Kinect-to-Mayhem">Kinect to Mayhem</a> </li><li><a href="http://channel9.msdn.com/Blogs/Clint/Project-Mayhem-an-overview">Project Mayhem - an overview</a> </li><li><a href="http://channel9.msdn.com/Blogs/Clint/Project-Mayhem-Creating-a-module">Project Mayhem - Creating a module</a> </li><li><a href="http://channel9.msdn.com/coding4fun/articles/Making-Mayhem-with-Volume-Control">Making Mayhem with Volume Control</a> </li><li><a href="http://channel9.msdn.com/Shows/This&#43;Week&#43;On&#43;Channel&#43;9/TWC9-May-04-2012">TWC9: CodePlex Facelift, a little Mayhem, Targeting Async, GUIDs and more</a> </li><li><a href="http://coolthingoftheday.blogspot.com/2012/03/make-mayhem-open-source-event-driven.html">Make Mayhem! The open source, event driven, add-on enabled, graphical service connection utility</a> </li></ul> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/.net+gadgeteer/RSS&WT.dl=0&WT.entryid=Entry:RSSView:1da3171a044e498db179a079013dd410">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Michael-makes-a-beeline-to-some-Mayhem-with-the-Net-Gadgeteer-and-XBee</comments>
      <itunes:summary>Today&#39;s Hardware Friday post is an example of how we can make mesh our software and hardware worlds, all the while taking advantage of plug-and-play like features. Michael Dodaro, friend of the blog shows us how we take the Plug-and-play features of Mayhem and hook them up to the plug-and-play hardware features of the .Net Gadgeteer platform... Making Mayhem with .NET GadgeteerMayhem is an open source application that supports triggers, events, and reactions. The core Mayhem application runs on a PC, but the events and reactions it uses are interoperable with just about any platform or device. The guys making Mayhem say that non-programmers can use it to automate anything! This seems an invitation to try Mayhem with .NET Gadgeteer.  Creating events and reactions that run with Mayhem is not difficult after a look at the API Reference, which explains methods to override. The example implemented in this article requires a static class in order to use a single instance of Paul Mineau’s XBeeClient. The XBeeClient is a driver for XBee radios. It provides a serial interface that services two events. Mayhem persists state information when the events are turned off or Mayhem is shut down. As you might expect, the post not only provides a short introduction to Mayhem but how to integrate it with a .NET Gadgeteer project. .NET Gadgeteer Devices Automated by Mayhem Events and Reactions Embedded microcontroller devices often run without an operating system, and they communicate with PCs in various ways. Mayhem EventBase and ReactionBase classes can automate .NET Gadgeteer devices as in the example we’re building, which uses XBee radio communication to and from a device. The device uses .NET Gadgeteer compatible GHI Electronics Light Sensor and Seeed Relay modules and the .NET Gadgeteer XBee adapter for XBee radio communication.  The relay module in this device can control AC electrical circuits that use power up to 15 Amps/120 Volts or 7 Amps/250 Volts. The light sensor is an an</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/Michael-makes-a-beeline-to-some-Mayhem-with-the-Net-Gadgeteer-and-XBee</link>
      <pubDate>Fri, 29 Jun 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Michael-makes-a-beeline-to-some-Mayhem-with-the-Net-Gadgeteer-and-XBee</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/f98c1e5c-5666-4cbb-8ee2-52f19661ccd8.png" height="52" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/4563b65e-4c92-4d0c-b6ef-c693e58e508b.png" height="115" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/Michael-makes-a-beeline-to-some-Mayhem-with-the-Net-Gadgeteer-and-XBee/RSS</wfw:commentRss>
      <category>Coding4Fun</category>
      <category>.Net Gadgeteer</category>
    </item>
  <item>
      <title>Gadgeteer LED Matrix Module Demo</title>
      <description><![CDATA[<p class="first">Quick demo of the new (<strong>NOTE</strong>: this module only works with .NET Micro Framework 4.2, and the driver is still in beta at the time of this writing) LED Matrix module for .NET Gadgeteer, manufactured by GHI Electronics. The module, which is based on the DaisyLink protocol, and contains its own microprocessor (which can be flashed and reprogrammed, if desired) provides an 8x8 matrix of red LEDs for displaying patterns or glyphs.</p><p>In this video, I am using a helper class I wrote to display &quot;HELLO WORLD&quot;. The driver for the module exposes a single API, DrawBitmap, which takes as an argument a byte array representing the on/off pattern for the LEDs. To make working with the module simpler, I wrote a class with a series of static properties that return the byte array for the uppercase English letters A-Z and numbers 0-9.</p><p>To generate the byte arrays required for each letter, I wrote up a quick and dirty HTML and JavaScript utility that displays an 8x8 array of checkboxes, which you can use to create the desired glyph, and which automatically provides the correctly-formatted byte array for use with the LED Matrix module.</p><p>With my helper class, I simply create an ArrayList of the letters I want to display, then loop through the ArrayList, displaying each letter in turn. I've named the letters using the NATO phonetic alphabet to make the API intuitive without using single letter property names.</p><p>Links:</p><ul><li><a href="http://www.ghielectronics.com/catalog/product/370" target="_blank">GHI's LED Matrix Module</a> </li><li><a href="http://www.tinyclr.com/codeshare/entry/444" target="_blank">Alphabet Helper Class code on TinyCLR Codeshare</a> </li><li><a href="http://www.tinyclr.com/forum/topic?id=7450&amp;page=1#msg72987" target="_blank">Helper Class discussion thread</a> </li><li><a href="http://jsfiddle.net/devhammer/y2WAY/35/" target="_blank">HTML/JavaScript 8x8 glyph generator for LED Matrix Module</a> </li></ul> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/.net+gadgeteer/RSS&WT.dl=0&WT.entryid=Entry:RSSView:7121ab49b2ee4cee8b3ea070015c98ab">]]></description>
      <comments>http://channel9.msdn.com/Blogs/gduthie/Gadgeteer-LED-Matrix-Module-Demo</comments>
      <itunes:summary>Quick demo of the new (NOTE: this module only works with .NET Micro Framework 4.2, and the driver is still in beta at the time of this writing) LED Matrix module for .NET Gadgeteer, manufactured by GHI Electronics. The module, which is based on the DaisyLink protocol, and contains its own microprocessor (which can be flashed and reprogrammed, if desired) provides an 8x8 matrix of red LEDs for displaying patterns or glyphs. In this video, I am using a helper class I wrote to display &amp;quot;HELLO WORLD&amp;quot;. The driver for the module exposes a single API, DrawBitmap, which takes as an argument a byte array representing the on/off pattern for the LEDs. To make working with the module simpler, I wrote a class with a series of static properties that return the byte array for the uppercase English letters A-Z and numbers 0-9. To generate the byte arrays required for each letter, I wrote up a quick and dirty HTML and JavaScript utility that displays an 8x8 array of checkboxes, which you can use to create the desired glyph, and which automatically provides the correctly-formatted byte array for use with the LED Matrix module. With my helper class, I simply create an ArrayList of the letters I want to display, then loop through the ArrayList, displaying each letter in turn. I&#39;ve named the letters using the NATO phonetic alphabet to make the API intuitive without using single letter property names. Links: GHI&#39;s LED Matrix Module Alphabet Helper Class code on TinyCLR Codeshare Helper Class discussion thread HTML/JavaScript 8x8 glyph generator for LED Matrix Module </itunes:summary>
      <itunes:duration>31</itunes:duration>
      <link>http://channel9.msdn.com/Blogs/gduthie/Gadgeteer-LED-Matrix-Module-Demo</link>
      <pubDate>Fri, 15 Jun 2012 02:15:32 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/Blogs/gduthie/Gadgeteer-LED-Matrix-Module-Demo</guid>
      <media:thumbnail url="http://media.ch9.ms/ch9/5559/e02845ad-03f4-4db6-aa5f-a66cd4045559/LEDMatrix_100.jpg" height="56" width="100"></media:thumbnail>
      <media:thumbnail url="http://media.ch9.ms/ch9/5559/e02845ad-03f4-4db6-aa5f-a66cd4045559/LEDMatrix_220.jpg" height="123" width="220"></media:thumbnail>
      <media:thumbnail url="http://media.ch9.ms/ch9/5559/e02845ad-03f4-4db6-aa5f-a66cd4045559/LEDMatrix_512.jpg" height="288" width="512"></media:thumbnail>
      <media:group>
        <media:content url="http://media.ch9.ms/ch9/5559/e02845ad-03f4-4db6-aa5f-a66cd4045559/LEDMatrix.mp3" expression="full" duration="31" fileSize="512564" type="audio/mp3" medium="audio"></media:content>
        <media:content url="http://media.ch9.ms/ch9/5559/e02845ad-03f4-4db6-aa5f-a66cd4045559/LEDMatrix.mp4" expression="full" duration="31" fileSize="3006427" type="video/mp4" medium="video"></media:content>
        <media:content url="http://media.ch9.ms/ch9/5559/e02845ad-03f4-4db6-aa5f-a66cd4045559/LEDMatrix.webm" expression="full" duration="31" fileSize="1186070" type="video/webm" medium="video"></media:content>
        <media:content url="http://media.ch9.ms/ch9/5559/e02845ad-03f4-4db6-aa5f-a66cd4045559/LEDMatrix.wma" expression="full" duration="31" fileSize="275391" type="audio/x-ms-wma" medium="audio"></media:content>
        <media:content url="http://media.ch9.ms/ch9/5559/e02845ad-03f4-4db6-aa5f-a66cd4045559/LEDMatrix.wmv" expression="full" duration="31" fileSize="7045672" type="video/x-ms-wmv" medium="video"></media:content>
        <media:content url="http://media.ch9.ms/ch9/5559/e02845ad-03f4-4db6-aa5f-a66cd4045559/LEDMatrix_high.mp4" expression="full" duration="31" fileSize="6548386" type="video/mp4" medium="video"></media:content>
        <media:content url="http://media.ch9.ms/ch9/5559/e02845ad-03f4-4db6-aa5f-a66cd4045559/LEDMatrix_mid.mp4" expression="full" duration="31" fileSize="4581602" type="video/mp4" medium="video"></media:content>
        <media:content url="http://media.ch9.ms/ch9/5559/e02845ad-03f4-4db6-aa5f-a66cd4045559/LEDMatrix_Source.wmv" expression="full" duration="31" fileSize="32837502" type="video/x-ms-wmv" medium="video"></media:content>
      </media:group>      
      <enclosure url="http://media.ch9.ms/ch9/5559/e02845ad-03f4-4db6-aa5f-a66cd4045559/LEDMatrix.wmv" length="7045672" type="video/x-ms-wmv"></enclosure>
      <dc:creator>G. Andrew Duthie</dc:creator>
      <itunes:author>G. Andrew Duthie</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/Blogs/gduthie/Gadgeteer-LED-Matrix-Module-Demo/RSS</wfw:commentRss>
      <category>Gadgeteer</category>
      <category>.Net Gadgeteer</category>
    </item>
  <item>
      <title>Open-Source 3D Models of .NET Gadgeteer Hardware</title>
      <description><![CDATA[<p>Today's Hardware Friday project really is pretty different and while there's no real hardware and there's no source, there is something that I thought all you hardware geeks might find pretty useful.</p><p>So you're a .Net Gadgeteer builder. Your project is coming together and now you want to build a case, cover, fitting or something. To build it just right you need the given hardware pieces, the buttons, boards, etc, so you can measure and fit it. But you don't want to use the actual hardware for that (since it's already assembled and all that)... What you need is something that is just like the hardware, same size and all, a real life model of the hardware pieces. Maybe even something you could 3D print yourself?</p><h2><a href="http://blogs.msdn.com/b/net_gadgeteer/archive/2012/05/25/3d-print-a-custom-device-with-open-source-3d-models-of-net-gadgeteer-hardware.aspx" target="_blank">3D-Print a Custom Gadget: Open-Source 3D Models of .NET Gadgeteer Hardware</a></h2><blockquote><p>Today we are contributing a large number of 3D models of .NET Gadgeteer-compatible hardware modules to the <a href="http://gadgeteer.codeplex.com">Gadgeteer Codeplex project</a>.</p><p>The files make it easy to design custom enclosures for Gadgeteer devices – we call these <em>shells</em>. You can import these files into the 3D design tool of your choice (such as <a href="http://www.123dapp.com/">123D</a>, <a href="http://www.solidworks.com/">SolidWorks</a>, <a href="http://usa.autodesk.com/autodesk-inventor/">Inventor</a> or <a href="http://www.alibre.com/">Alibre</a>) and use the models as reference in your shell design. This saves you the trouble of having to measure each module individually, and improves the likelihood that everything will fit nicely inside your shell once it is actually manufactured.</p><p>Once you have designed a shell you can 3D-print it. If you don’t have direct access to a 3D printer, you can upload it to one of several online 3D printing services (such as <a href="http://www.ponoko.com/">Ponoko</a>, <a href="http://www.shapeways.com/">Shapeways</a> or <a href="http://i.materialise.com/">iMaterialise</a>). Today we are contributing models of many of the currently available Gadgeteer modules. Not every module is included - new modules are being released faster than we can model them! Over the coming months we will continue to add new models, and will be publishing some guidelines for others to contribute their own. We are also planning to release some ready-to-print shell designs. Below is a preview of the first one – a design for a Gadgeteer plant-moisture sensor.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B7%5D-21.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B3%5D-45.png" alt="image" width="500" height="286" border="0"></a></p></blockquote><p>Here's a snap of the current 44 designs;&nbsp;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B3%5D-52.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B1%5D-64.png" alt="image" width="186" height="427" border="0"></a></p><p>I grabbed 123D and it's able to open most of these with no problems.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B10%5D-24.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B4%5D-39.png" alt="image" width="408" height="407" border="0"></a></p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B16%5D-16.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B6%5D-27.png" alt="image" width="408" height="407" border="0"></a><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B19%5D-10.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B7%5D-28.png" alt="image" width="408" height="407" border="0"></a></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/.net+gadgeteer/RSS&WT.dl=0&WT.entryid=Entry:RSSView:f52bfc84d6b244b0b210a064015a1e09">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Open-Source-3D-Models-of-NET-Gadgeteer-Hardware</comments>
      <itunes:summary>Today&#39;s Hardware Friday project really is pretty different and while there&#39;s no real hardware and there&#39;s no source, there is something that I thought all you hardware geeks might find pretty useful. So you&#39;re a .Net Gadgeteer builder. Your project is coming together and now you want to build a case, cover, fitting or something. To build it just right you need the given hardware pieces, the buttons, boards, etc, so you can measure and fit it. But you don&#39;t want to use the actual hardware for that (since it&#39;s already assembled and all that)... What you need is something that is just like the hardware, same size and all, a real life model of the hardware pieces. Maybe even something you could 3D print yourself? 3D-Print a Custom Gadget: Open-Source 3D Models of .NET Gadgeteer HardwareToday we are contributing a large number of 3D models of .NET Gadgeteer-compatible hardware modules to the Gadgeteer Codeplex project. The files make it easy to design custom enclosures for Gadgeteer devices – we call these shells. You can import these files into the 3D design tool of your choice (such as 123D, SolidWorks, Inventor or Alibre) and use the models as reference in your shell design. This saves you the trouble of having to measure each module individually, and improves the likelihood that everything will fit nicely inside your shell once it is actually manufactured. Once you have designed a shell you can 3D-print it. If you don’t have direct access to a 3D printer, you can upload it to one of several online 3D printing services (such as Ponoko, Shapeways or iMaterialise). Today we are contributing models of many of the currently available Gadgeteer modules. Not every module is included - new modules are being released faster than we can model them! Over the coming months we will continue to add new models, and will be publishing some guidelines for others to contribute their own. We are also planning to release some ready-to-print shell designs. Below is a preview of the first</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/Open-Source-3D-Models-of-NET-Gadgeteer-Hardware</link>
      <pubDate>Fri, 08 Jun 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Open-Source-3D-Models-of-NET-Gadgeteer-Hardware</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/a767b96f-aaff-44fe-a436-b4f870fa4d00.png" height="57" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/cce0a03a-7bd1-405e-979f-35fe739d42b7.png" height="126" width="220"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/7f653a1b-f3a9-4ab7-963b-d1d76ba39b7e.png" height="288" width="512"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/Open-Source-3D-Models-of-NET-Gadgeteer-Hardware/RSS</wfw:commentRss>
      <category>3D Modeling</category>
      <category>Coding4Fun</category>
      <category>3D printer</category>
      <category>3D modeling</category>
      <category>.Net Gadgeteer</category>
    </item>
  <item>
      <title>32feet.NET, Bluetooth and .Net Gadgeteer</title>
      <description><![CDATA[<p>For our Hardware Friday we're going to mix in some Bluetooth and WPF in our .Net Gadgeteer world...</p><h2><a href="http://mikedodaro.net/2012/04/21/controlling-a-gadgeteer-device-using-bluetooth-module-and-32feet-net-library/" target="_blank">Controlling a Gadgeteer device using Bluetooth Module and 32feet.NET library</a></h2><blockquote><p>In this post, I’ll show how to send messages to a <a href="http://www.ghielectronics.com/catalog/product/312">GHI Bluetooth module</a> from a PC application using the <a href="http://32feet.codeplex.com/">32feet .NET library</a>.</p><p>First of all, let’s create the Gadgeteer application. Connect an <a href="http://www.ghielectronics.com/catalog/product/280">USB ClientDP</a> and an <a href="http://www.ghielectronics.com/catalog/product/343">OLED Display</a> to a <a href="http://www.ghielectronics.com/catalog/product/269">FEZ Spider Mainboard</a>, as in the following screenshot.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B5%5D-19.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B3%5D-40.png" alt="image" width="484" height="364" border="0"></a></p><p>...</p></blockquote><p>Let's quickly jump over to a snip about 32feet.Net.</p><h3><a href="http://32feet.codeplex.com/" target="_blank">32feet.NET - Personal Area Networking for .NET</a></h3><blockquote><p>32feet.NET is a shared-source project to make personal area networking technologies such as Bluetooth, Infrared (IrDA) and more, easily accessible from .NET code. Supports desktop, mobile or embedded systems. 32feet.NET is free for commercial or non-commercial use. If you use the binaries you can just use the library as-is, if you make modifications to the source you need to include the 32feet.NET License.txt document and ensure the file headers are not modified/removed. The project currently consists of the following libraries:-</p><ul><li>Bluetooth </li><li>IrDA </li><li>Object Exchange </li></ul><p>Bluetooth support requires a device with either the Microsoft, Widcomm, BlueSoleil, or Stonestreet One Bluetopia Bluetooth stack. Requires .NET Compact Framework v2.0 or above and Windows CE.NET 4.2 or above, or .NET Framework v2.0 for desktop Windows XP, Windows Vista and Windows 7.</p></blockquote><p>Now back to the project post where it continues discussing adding Bluetooth to the device.</p><blockquote><p>We don’t add the Bluetooth module to the Designer because we use the beta driver implemented by <strong><a href="https://gadgeteerbluetooth.codeplex.com/">Eduardo Velloso</a></strong><strong></strong>. Download the driver from CodePlex and add the<em> Bluetooth.cs</em> file to your project. Connect the module to socket 9. We initialize the driver in the <strong>ProgramStarted</strong> method:</p><p><pre class="brush: csharp">bluetooth = new Bluetooth(9); 

client = bluetooth.ClientMode; 

bluetooth.SetDeviceName(&quot;Gadgeteer&quot;); 

bluetooth.SetPinCode(&quot;1234&quot;); 

bluetooth.DataReceived &#43;= new Bluetooth.DataReceivedHandler(bluetooth_DataReceived); 

client.EnterPairingMode();
</pre></p><p>In this code, we set <strong>Gadgeteer</strong> as device name and we configure a PIN code. Then, in the <strong>bluetooth_DataReceived</strong> event handler, we print the received text on display:</p><p><pre class="brush: csharp">private void bluetooth_DataReceived(Bluetooth sender, string data) { 

oledDisplay.SimpleGraphics.ClearNoRedraw(); 

oledDisplay.SimpleGraphics.DisplayText(data, Resources.GetFont(Resources.FontResources.NinaB), 

GT.Color.Yellow, 0, 60); 

}
</pre></p><p>Now that the Gadgeteer application is up and running, and the Bluetooth module is correctly configured, we can write a PC program to control it.</p></blockquote><p>The last piece is to write the WPF app that is used to send the commands to the device.</p><blockquote><p>Create a new WPF Application with name <em>BluetoothControl</em>. Write the following XAML in the <strong>MainPage.xaml</strong> file:</p><p>...</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B9%5D-15.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B5%5D-31.png" alt="image" width="500" height="292" border="0"></a></p><p>...</p><p>In the <strong>btnSendMessage_Click</strong> event handler, if the connection has been correcly established, we can send messages over the stream:</p><p><pre class="brush: csharp">private void btnSendMessage_Click(object sender, RoutedEventArgs e) { 

if (bluetooth.Connected &amp;&amp; bluetoothStream != null) 

{ 

var buffer = System.Text.Encoding.UTF8.GetBytes(txtMessage.Text); 

bluetoothStream.Write(buffer, 0, buffer.Length); 

txtMessage.Text = string.Empty; 

} 

}
</pre></p><p>We simply get the bytes that compose the message and then we call the <strong>Write</strong> method on the stream object: the Bluetooth module on Gadgeteer device will receive the data and show it on the diplay.</p></blockquote><p>If you're thought adding Bluetooth communication to your devices might be hard then you really need to read this post and download the code...</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/.net+gadgeteer/RSS&WT.dl=0&WT.entryid=Entry:RSSView:3fcd0cfa62264d6e9343a04101645b38">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/32feetNET-Bluetooth-and-Net-Gadgeteer</comments>
      <itunes:summary>For our Hardware Friday we&#39;re going to mix in some Bluetooth and WPF in our .Net Gadgeteer world... Controlling a Gadgeteer device using Bluetooth Module and 32feet.NET libraryIn this post, I’ll show how to send messages to a GHI Bluetooth module from a PC application using the 32feet .NET library. First of all, let’s create the Gadgeteer application. Connect an USB ClientDP and an OLED Display to a FEZ Spider Mainboard, as in the following screenshot.  ... Let&#39;s quickly jump over to a snip about 32feet.Net. 32feet.NET - Personal Area Networking for .NET32feet.NET is a shared-source project to make personal area networking technologies such as Bluetooth, Infrared (IrDA) and more, easily accessible from .NET code. Supports desktop, mobile or embedded systems. 32feet.NET is free for commercial or non-commercial use. If you use the binaries you can just use the library as-is, if you make modifications to the source you need to include the 32feet.NET License.txt document and ensure the file headers are not modified/removed. The project currently consists of the following libraries:- Bluetooth IrDA Object Exchange Bluetooth support requires a device with either the Microsoft, Widcomm, BlueSoleil, or Stonestreet One Bluetopia Bluetooth stack. Requires .NET Compact Framework v2.0 or above and Windows CE.NET 4.2 or above, or .NET Framework v2.0 for desktop Windows XP, Windows Vista and Windows 7. Now back to the project post where it continues discussing adding Bluetooth to the device. We don’t add the Bluetooth module to the Designer because we use the beta driver implemented by Eduardo Velloso. Download the driver from CodePlex and add the Bluetooth.cs file to your project. Connect the module to socket 9. We initialize the driver in the ProgramStarted method: bluetooth = new Bluetooth(9); 

client = bluetooth.ClientMode; 

bluetooth.SetDeviceName(&amp;quot;Gadgeteer&amp;quot;); 

bluetooth.SetPinCode(&amp;quot;1234&amp;quot;); 

bluetooth.DataReceived &amp;#43;= new Bluetooth.DataRec</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/32feetNET-Bluetooth-and-Net-Gadgeteer</link>
      <pubDate>Fri, 04 May 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/32feetNET-Bluetooth-and-Net-Gadgeteer</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/711492fb-ccc4-470d-a35f-531bacc4263b.png" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/00de4608-4fdf-4be3-abcb-80785dc60dec.png" height="165" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/32feetNET-Bluetooth-and-Net-Gadgeteer/RSS</wfw:commentRss>
      <category>.NET Micro Framework</category>
      <category>C#</category>
      <category>Coding4Fun</category>
      <category>.Net Gadgeteer</category>
    </item>
  <item>
      <title>Controlling a .NET Gadgeteer Device with your mind...</title>
      <description><![CDATA[<p>You all know my love-love relationship with mind control... well... I mean mind reading... um... (you know!) devices like the Emotive device. Well when I saw this project, one the melds a less expensive device with C# and and Fez .NET Gadgeteer device? Well I almost wet my pants (TMI?)</p><p>Come on, how you can you not get excited about the possibilities in something like this?</p><h2><a href="http://mikedodaro.net/2012/04/18/mind-control-of-net-gadgeteer-device-via-neurosky-eeg-sensor/" target="_blank">Mind Control of .NET Gadgeteer Device via Neurosky EEG Sensor</a></h2><blockquote><p>This experiment leaves much to the imagination, but it does demonstrate how wave forms of the human brain can determine events on a device with an embedded microcontroller. This code scenario is submitted for use in the <strong>Open Health and Fitness Data Aggregator</strong> project headed by <strong>Ira Laefsky</strong>. The <a href="http://www.neurosky.com/"><strong>Neurosky Mind Wave</strong></a> sensor is an economical electroencephalograph designed for extensibility with other applications. For less than $100 the device includes the <strong>Think Gear Connector</strong>, which runs on the <strong>Windows</strong> or <strong>Mac </strong>operating systems and supports an API. With two lines of code you can initialize the <strong>Think Gear Connector</strong> to access the output of the <strong>Neurosky</strong> electroencephalograph (C# requires the interop thinkgear.dll in the folder with the executable).</p><p><code>int</code> <code>connectId = ThinkGear.TG_GetNewConnectionId(); </code></p><p><code>int</code> <code>succeeded = ThinkGear.TG_Connect(0, </code><code>&quot;COM7&quot;</code><code>, </code></p><p><code></code><code>ThinkGear.BAUD_57600, ThinkGear.STREAM_PACKETS); </code></p><p><code>Console.WriteLine(</code><code>&quot;Any key to continue... .&quot;</code><code>); </code></p><p><code>Console.ReadKey();</code></p><p><strong>The connector sorts the data into the following wave-form categories - from the developer’s guide:</strong></p><p><strong>eSense</strong>: A container for the eSense™ attributes, which are integer values between 0 and 100. Zero is perceived as a lack of that attribute and 100 is an excess of that attribute.</p><ul><li>attention. The eSense Attention value. </li><li>meditation. The eSense Meditation value. </li></ul><p><strong>eegPowe</strong>r: A container for the EEG powers. These may be either integer or foating-point values.</p><ul><li>delta. The “delta” band of EEG. </li><li>theta. The “theta” band of EEG. </li><li>lowAlpha. The “low alpha” band of EEG. </li><li>highAlpha. The “high alpha” band of EEG. </li><li>lowBeta. The “low beta” band of EEG. </li><li>highBeta. The “high beta” band of EEG. </li><li>lowGamma. The “low gamma” band of EEG. </li><li>highGamma. The “high gamma” band of EEG. </li></ul><p><strong>rawEeg</strong>: The raw data reading off the forehead sensor. This may be either an integer or a foating-point value.</p><p><strong>blinkStrength</strong>: The strength of a detected blink. This is an integer in the range of 0-255.</p></blockquote><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B3%5D-47.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B1%5D-55.png" alt="image" width="416" height="285" border="0"></a></p><blockquote><h5>Control the .NET Gadgeteer Device with Brain Waves</h5><p>The sorted wave-form data from the <strong>Mind Gear Connector</strong> could be sent to a <strong>.NET Gadgeteer</strong> device in several ways. This example sends data as an http request to a Web service running on a <strong>.NET Gadgeteer</strong> device. A WiFi connection enables the connection by using the <strong><a href="http://www.ghielectronics.com/catalog/product/282">WiFi RS21 Module </a></strong>available from <a href="http://www.ghielectronics.com/"><strong>GHI Electronics</strong></a>.</p><p>The following illustration shows the <a href="http://www.ghielectronics.com/catalog/product/282">WiFi RS21 </a>module, the <a href="http://www.ghielectronics.com/catalog/product/269">GHI Electronics FEZ Spider </a>mainboard, and four <a href="http://www.ghielectronics.com/catalog/product/272">Smart Multicolor LED Modules </a>connected by the <strong>daisy-link</strong> method, as described in the <a href="http://gadgeteer.codeplex.com/releases/view/72208">.NET Gadgeteer Module Builder’s Guide version 1.8</a>.</p><p>...</p><p>The user wearing the Neurosky EEG sensor starts sending data. The command window prompts the user and waits for connection to the <strong>Mind Gear Connector</strong> to initialize. When it continues, it will read packets of data from the connection according to the defined wave-forms. When various wave-forms reach an arbitrary value, the wave-form are assigned an integer value that is sent to the .NET Gadgeteer device . Sending all of the data is unnecessary for this experiment, so the threshold is set high enough to limit the amount of data sent to the Web service. Probably the middle range of each wave-form values could be disregarded and the low and high ranges sent.</p><p>...</p></blockquote><p>There's a great deal more information in the post, so please click through for all the details...</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/.net+gadgeteer/RSS&WT.dl=0&WT.entryid=Entry:RSSView:d23aa6e6d6484056af1ea03a0033ddf1">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Controlling-a-NET-Gadgeteer-Device-with-your-mind</comments>
      <itunes:summary>You all know my love-love relationship with mind control... well... I mean mind reading... um... (you know!) devices like the Emotive device. Well when I saw this project, one the melds a less expensive device with C# and and Fez .NET Gadgeteer device? Well I almost wet my pants (TMI?) Come on, how you can you not get excited about the possibilities in something like this? Mind Control of .NET Gadgeteer Device via Neurosky EEG SensorThis experiment leaves much to the imagination, but it does demonstrate how wave forms of the human brain can determine events on a device with an embedded microcontroller. This code scenario is submitted for use in the Open Health and Fitness Data Aggregator project headed by Ira Laefsky. The Neurosky Mind Wave sensor is an economical electroencephalograph designed for extensibility with other applications. For less than $100 the device includes the Think Gear Connector, which runs on the Windows or Mac operating systems and supports an API. With two lines of code you can initialize the Think Gear Connector to access the output of the Neurosky electroencephalograph (C# requires the interop thinkgear.dll in the folder with the executable). int connectId = ThinkGear.TG_GetNewConnectionId();  int succeeded = ThinkGear.TG_Connect(0, &amp;quot;COM7&amp;quot;,  ThinkGear.BAUD_57600, ThinkGear.STREAM_PACKETS);  Console.WriteLine(&amp;quot;Any key to continue... .&amp;quot;);  Console.ReadKey(); The connector sorts the data into the following wave-form categories - from the developer’s guide: eSense: A container for the eSense™ attributes, which are integer values between 0 and 100. Zero is perceived as a lack of that attribute and 100 is an excess of that attribute. attention. The eSense Attention value. meditation. The eSense Meditation value. eegPower: A container for the EEG powers. These may be either integer or foating-point values. delta. The “delta” band of EEG. theta. The “theta” band of EEG. lowAlpha. The “low alpha” band of EEG. highAlpha. The “high</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/Controlling-a-NET-Gadgeteer-Device-with-your-mind</link>
      <pubDate>Fri, 27 Apr 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Controlling-a-NET-Gadgeteer-Device-with-your-mind</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/3190f2f1-d7f9-4aa1-85b1-40f820e6382b.png" height="65" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/e7b84858-529b-4bc4-bcd4-947122bf5ec6.png" height="144" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/Controlling-a-NET-Gadgeteer-Device-with-your-mind/RSS</wfw:commentRss>
      <category>C#</category>
      <category>Coding4Fun</category>
      <category>neurosky</category>
      <category>.Net Gadgeteer</category>
    </item>
  <item>
      <title>Tyrant&#39;s aren&#39;t all bad, especially when they are micro and running on .NET Gadgeteer&#39;s</title>
      <description><![CDATA[<p>Our Hardware Friday post in this game theme week combines a couple of fun things, .Net Gadgeteer hardware and a RPG game (well the start of one at least). It also shows off a couple thing projects mentioned here in past posts, <a href="http://channel9.msdn.com/coding4fun/blog/Gliding-into-a-Net-Micro-Framework-UI-design-with-GLIDE" target="_blank">Gliding into a .Net Micro Framework UI design with GLIDE</a> and <a href="http://channel9.msdn.com/coding4fun/blog/Along-came-a-spider-a-NET-Gadgeteer-FEZ-Spider" target="_blank">Along came a spider... a .NET Gadgeteer FEZ Spider!</a>, <a href="http://channel9.msdn.com/coding4fun/blog/Unboxing-and-some-Visual-Studio-fun-with-the-GHI-FEZ-Spider-Gadgeteer-Starter-kit" target="_blank">Unboxing and some Visual Studio fun with the GHI FEZ Spider Gadgeteer Starter kit</a></p><h2><a href="http://blog.vbmagic.net/2012/02/08/have-the-starts-of-a-game-running-on-the-fez-spider/" target="_blank">Have the starts of a game running on the FEZ Spider</a></h2><blockquote><p>Just a quick post to show what I’ve been doing with the new toy</p><p>Of course I started to write the same game as I have going on the Windows Phone and Azure.</p><p>The below picture shows the components used in the project:</p><p><a href="http://blog.vbmagic.net/2012/02/08/have-the-starts-of-a-game-running-on-the-fez-spider/" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B20%5D-8.png" alt="image" width="429" height="407" border="0"></a></p><p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/S-z6crGyiu8&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/S-z6crGyiu8&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p></blockquote><h2><a href="http://blog.vbmagic.net/2012/02/10/added-a-generator-tool-windows-in-vb-net-for-tyranntmicro/" target="_blank">Added a generator tool (Windows) in VB.net for TyranntMicro</a></h2><blockquote><p>Added a new generator tool. So far it can just generate items:</p><p><a href="http://blog.vbmagic.net/2012/02/10/added-a-generator-tool-windows-in-vb-net-for-tyranntmicro/" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B19%5D-9.png" alt="image" width="306" height="223" border="0"></a></p><p>This tool will store the items in “|” delimited text files which can easily be turned into objects using the split(“|”c) or split(‘|’) string function.</p><p>An example of the above “Arrows” item is:</p><p><code>1.0|Arrows||A Quiver of arrows. Holds a maximum of 10 arrows|arrowico.gif|arrow.gif|ammo|10|0|False|False|False</code></p><p>I was planning to do this on the Spider but it just makes more sense to do this on a desktop machine.</p><p>So Character Generator is almost finished. (Starting items are all that is required)<br>Item generator done.</p><p>Next when I get spare time I’ll start working on the Maze Generator in the generator tool and a “Play Game” screen system on the Spider.</p></blockquote><h2><a href="http://tyranntmicro.codeplex.com/">Tyrannt Micro</a></h2><blockquote><p>This is an RPG game which runs on the .net Micro Framework Gadgeteer platform. It uses the FEZ Spider hardware</p><p><br>This is an RPG game that uses the .net Micro Framework Gadgeteer platform. I basically wanted a project to learn how to use different components so thought Game was a good idea. The hardware required for this project is:</p><ul><li>FEZ Spider </li><li>T35 Display Module </li><li>SD Card Module </li></ul><p>... <a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B14%5D-19.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B4%5D-35.png" alt="image" width="493" height="355" border="0"></a></p></blockquote><p>Here's a snap of from the latest check-in;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B18%5D-9.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B6%5D-24.png" alt="image" width="219" height="361" border="0"></a></p><p>And a snip from the Character Generation Window routine (UI shown in the video);</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B23%5D-10.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B7%5D-26.png" alt="image" width="492" height="363" border="0"></a></p><p><pre class="brush: csharp">void InitCharacterGenWindow()
  {
      // get the current character
      Character currChar = characters[currentCharacter];

      // Get the name Text Box
      TextBox nameTextBox = (TextBox)characterGenWindow.GetChildByName(&quot;nameTextBox&quot;);
      // Get the races
      RadioButton humanRadio = (RadioButton)characterGenWindow.GetChildByName(&quot;humanRadioButton&quot;);
      RadioButton dwarfRadio = (RadioButton)characterGenWindow.GetChildByName(&quot;dwarfRadioButton&quot;);
      RadioButton elfRadio = (RadioButton)characterGenWindow.GetChildByName(&quot;elfRadioButton&quot;);
      RadioButton gnomeRadio = (RadioButton)characterGenWindow.GetChildByName(&quot;gnomeRadioButton&quot;);
      // Get the sexs
      RadioButton maleRadio = (RadioButton)characterGenWindow.GetChildByName(&quot;maleRadioButton&quot;);
      RadioButton femaleRadio = (RadioButton)characterGenWindow.GetChildByName(&quot;femaleRadioButton&quot;);
      // Get the stats
      TextBlock strTextBlock = (TextBlock)characterGenWindow.GetChildByName(&quot;strValue&quot;);
      TextBlock intTextBlock = (TextBlock)characterGenWindow.GetChildByName(&quot;intValue&quot;);
      TextBlock dexTextBlock = (TextBlock)characterGenWindow.GetChildByName(&quot;dexValue&quot;);

      // Set the Race
      switch (currChar.race.ToLower())
      {
          case &quot;human&quot;:
              humanRadio.Checked = true;
              dwarfRadio.Checked = false;
              elfRadio.Checked = false;
              gnomeRadio.Checked = false;
              break;
          case &quot;dwarf&quot;:
              humanRadio.Checked = false;
              dwarfRadio.Checked = true;
              elfRadio.Checked = false;
              gnomeRadio.Checked = false;
              break;
          case &quot;elf&quot;:
              humanRadio.Checked = false;
              dwarfRadio.Checked = false;
              elfRadio.Checked = true;
              gnomeRadio.Checked = false;
              break;
          case &quot;gnome&quot;:
              humanRadio.Checked = false;
              dwarfRadio.Checked = false;
              elfRadio.Checked = false;
              gnomeRadio.Checked = true;
              break;
          default:
              FatalError(currChar.race.ToLower() &#43; &quot; is unknown race&quot;);
              break;
      }

      // Set the Sex
      switch (currChar.sex.ToLower())
      {
          case &quot;male&quot;:
              maleRadio.Checked = true;
              femaleRadio.Checked = false;
              break;
          case &quot;female&quot;:
              maleRadio.Checked = false;
              femaleRadio.Checked = true;
              break;
          default:
              FatalError(currChar.sex.ToLower() &#43; &quot; is unknown sex&quot;);
              break;
      }

      // Set the name
      nameTextBox.Text = currChar.name;

      // Set the stats
      strTextBlock.Text = currChar.strength.Current.ToString();
      intTextBlock.Text = currChar.intelligence.Current.ToString();
      dexTextBlock.Text = currChar.dexterity.Current.ToString();

      // Refresh the portrait image
      reloadPortrait();

      // Display the character generator page
      Glide.MainWindow = characterGenWindow;
  }
</pre></p><p>If you've thought that creating a portable game device with your own RPG on it would be cool, this project might be a place for you to start...</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/.net+gadgeteer/RSS&WT.dl=0&WT.entryid=Entry:RSSView:e7c0c2bdb42547b4abf1a03301265d60">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Tyrants-arent-all-bad-especially-when-they-are-micro-and-running-on-NET-Gadgeteers</comments>
      <itunes:summary>Our Hardware Friday post in this game theme week combines a couple of fun things, .Net Gadgeteer hardware and a RPG game (well the start of one at least). It also shows off a couple thing projects mentioned here in past posts, Gliding into a .Net Micro Framework UI design with GLIDE and Along came a spider... a .NET Gadgeteer FEZ Spider!, Unboxing and some Visual Studio fun with the GHI FEZ Spider Gadgeteer Starter kit Have the starts of a game running on the FEZ SpiderJust a quick post to show what I’ve been doing with the new toy Of course I started to write the same game as I have going on the Windows Phone and Azure. The below picture shows the components used in the project:   Added a generator tool (Windows) in VB.net for TyranntMicroAdded a new generator tool. So far it can just generate items:  This tool will store the items in “|” delimited text files which can easily be turned into objects using the split(“|”c) or split(‘|’) string function. An example of the above “Arrows” item is: 1.0|Arrows||A Quiver of arrows. Holds a maximum of 10 arrows|arrowico.gif|arrow.gif|ammo|10|0|False|False|False I was planning to do this on the Spider but it just makes more sense to do this on a desktop machine. So Character Generator is almost finished. (Starting items are all that is required)Item generator done. Next when I get spare time I’ll start working on the Maze Generator in the generator tool and a “Play Game” screen system on the Spider. Tyrannt MicroThis is an RPG game which runs on the .net Micro Framework Gadgeteer platform. It uses the FEZ Spider hardware This is an RPG game that uses the .net Micro Framework Gadgeteer platform. I basically wanted a project to learn how to use different components so thought Game was a good idea. The hardware required for this project is: FEZ Spider T35 Display Module SD Card Module ...  Here&#39;s a snap of from the latest check-in;  And a snip from the Character Generation Window routine (UI shown in the video);  void InitCharac</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/Tyrants-arent-all-bad-especially-when-they-are-micro-and-running-on-NET-Gadgeteers</link>
      <pubDate>Fri, 20 Apr 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Tyrants-arent-all-bad-especially-when-they-are-micro-and-running-on-NET-Gadgeteers</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/c54674a4-52cc-4aab-a92a-3d5603a4c97d.png" height="72" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/c9736d46-68d2-409b-8d56-b39dec61997e.png" height="159" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>1</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/Tyrants-arent-all-bad-especially-when-they-are-micro-and-running-on-NET-Gadgeteers/RSS</wfw:commentRss>
      <category>.NET Micro Framework</category>
      <category>C#</category>
      <category>Coding4Fun</category>
      <category>.Net Gadgeteer</category>
    </item>
  <item>
      <title>Mom always said, &quot;Sit up straight...&quot; Well, here&#39;s a hardware project to help with that...</title>
      <description><![CDATA[<p>Today's Hardware Friday post shows off an interesting usage of an accelerometer and one that for many of use would not only proudly display our hardware building geekness, but also improve our health too!</p><h2><a href="http://mikedodaro.net/2012/03/09/posture-regulator-using-net-gadgeteer-accelerometer-from-seeed-studio/" target="_blank">Posture Regulator using .NET Gadgeteer Accelerometer from Seeed Studio</a></h2><blockquote><p>People who work in technology often spend many hours at the computer, which can make it difficult to maintain good posture. I’ve been advised by a physical therapist to keep my chest high with my head and neck upright. The problem is that fatigue tends to make me slouch. Then my neck is out of alignment, leading to some unpleasant grinding of vertibrae and tension in the shoulders.</p><p>The <strong>.NET Gadgeteer</strong> device in this example uses the <a href="http://www.seeedstudio.com/depot/accelerometer-module-net-gadgeteer-compatible-p-968.html?cPath=203">Seeed accelerometer module</a>, which can be calibrated with a single function to set the base position that should be maintained. I use a <a href="http://www.seeedstudio.com/depot/relay-module-net-gadgeteer-compatible-p-967.html?cPath=203">relay module</a>, also from Seeed Studio, to activate a beeper when the Z axis of my posture varies too far from the calibrated normal.</p><p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/1Ib91L_yMo0&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/1Ib91L_yMo0&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p><p>The accelerometer is similar to the sensor in a cell phone that detects whether the phone is in the horizontal or vertical orientation. The methods that the <strong>Seeed</strong> module supports are more than adequate for this application. There is a method to calibrate the position from which variation is measured. Monitoring the Z axis of the variation is sufficient to detect the kind of slouching I’m trying to avoid. For this prototype I simply attached the accelerometer to my sweater with a safety pin, as shown in the following photo.</p><p><a href="http://mikedodaro.net/2012/03/09/posture-regulator-using-net-gadgeteer-accelerometer-from-seeed-studio/" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B7%5D-15.png" alt="image" width="250" height="384" border="0"></a></p><p><a href="http://mikedodaro.net/2012/03/09/posture-regulator-using-net-gadgeteer-accelerometer-from-seeed-studio/" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B6%5D-33.png" alt="image" width="409" height="407" border="0"></a></p><p><a href="http://mikedodaro.net/2012/03/09/posture-regulator-using-net-gadgeteer-accelerometer-from-seeed-studio/" target="_blank"><img title="SNAGHTML28a02ee1" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML28a02ee1%5B4%5D.png" alt="SNAGHTML28a02ee1" width="557" height="407" border="0"></a></p></blockquote><h2><a href="http://mikedodaro.net/2012/03/10/posture-regulator-with-led-alert-silent/" target="_blank">Posture Regulator with LED Alert – Silent</a></h2><blockquote><p>This is a second iteration on the device using a<a href="http://www.seeedstudio.com/depot/accelerometer-module-net-gadgeteer-compatible-p-968.html?cPath=203"> Seeed accelerometer </a>as posture sensor that sends alerts when the user’s posture lapses from the position desirable for working extended periods in the seated position. The <a href="http://wp.me/p1TEdE-hU">previous version </a>used a buzzer on a relay circuit as an alert. It produced a sound that could drive one to distraction. This version uses a LED that simply turns red when the user wearing the accelerometer slouches or leans too far from the desirable vertical position.</p><p>The modules used in this application are shown in the following screen shot from the <a href="http://wp.me/p1TEdE-1c">.NET Gadgeteer Designer</a>.</p><p><a href="http://mikedodaro.net/2012/03/10/posture-regulator-with-led-alert-silent/" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B11%5D-22.png" alt="image" width="498" height="407" border="0"></a></p><p>Posture Accelerometer Sensor LED Alert</p><p>This implementation of the posture sensor is different from the previous version in that it doesn’t require a relay circuit to turn on a buzzer. It uses the <a href="http://www.ghielectronics.com/catalog/product/272">GHI Electronics multicolored LED module</a>. It also uses the <a href="http://www.seeedstudio.com/depot/oled-display-module-net-gadgeteer-compatible-p-1019.html?cPath=203">Seeed OLED Display module </a>instead of the larger and more expensive <a href="http://www.ghielectronics.com/catalog/product/276">Display T35 </a>from GHI Electronics.</p><p>The application logic is similar in this version to the previous except that it omits the relay circuit and turns on the LED instead of the buzzer. The following illustration shows the working components.</p><p><a href="http://mikedodaro.net/2012/03/10/posture-regulator-with-led-alert-silent/" target="_blank"><img title="SNAGHTML28a2933f" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML28a2933f%5B4%5D.png" alt="SNAGHTML28a2933f" width="494" height="407" border="0"></a></p><p>...</p><p>One surprising discovery in this version is that the <strong>Accelerometer.StartContinuousMeasurements </strong>method has to be set at a lower frequency than the previous version. Having the relay running on the board changed the configuration so that the button could interupt the continuous measurements and turn off the measurements. In this version I found that pushing the on/ off button had no effect until I slowed the rate of continuous measurements.</p></blockquote><p>Come on, what hardware hacker wouldn't want to wear something like that? Now to make it portable, and report posture results to a web site (and tweet them?), maybe some Bluetooth integration to an app, and... and... and...</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/.net+gadgeteer/RSS&WT.dl=0&WT.entryid=Entry:RSSView:94f916eded0e46afa7eea02b010f907a">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Mom-always-said-Sit-up-straight-Well-heres-a-hardware-project-to-help-with-that</comments>
      <itunes:summary>Today&#39;s Hardware Friday post shows off an interesting usage of an accelerometer and one that for many of use would not only proudly display our hardware building geekness, but also improve our health too! Posture Regulator using .NET Gadgeteer Accelerometer from Seeed StudioPeople who work in technology often spend many hours at the computer, which can make it difficult to maintain good posture. I’ve been advised by a physical therapist to keep my chest high with my head and neck upright. The problem is that fatigue tends to make me slouch. Then my neck is out of alignment, leading to some unpleasant grinding of vertibrae and tension in the shoulders. The .NET Gadgeteer device in this example uses the Seeed accelerometer module, which can be calibrated with a single function to set the base position that should be maintained. I use a relay module, also from Seeed Studio, to activate a beeper when the Z axis of my posture varies too far from the calibrated normal.  The accelerometer is similar to the sensor in a cell phone that detects whether the phone is in the horizontal or vertical orientation. The methods that the Seeed module supports are more than adequate for this application. There is a method to calibrate the position from which variation is measured. Monitoring the Z axis of the variation is sufficient to detect the kind of slouching I’m trying to avoid. For this prototype I simply attached the accelerometer to my sweater with a safety pin, as shown in the following photo.    Posture Regulator with LED Alert – SilentThis is a second iteration on the device using a Seeed accelerometer as posture sensor that sends alerts when the user’s posture lapses from the position desirable for working extended periods in the seated position. The previous version used a buzzer on a relay circuit as an alert. It produced a sound that could drive one to distraction. This version uses a LED that simply turns red when the user wearing the accelerometer slouches or leans too</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/Mom-always-said-Sit-up-straight-Well-heres-a-hardware-project-to-help-with-that</link>
      <pubDate>Fri, 13 Apr 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Mom-always-said-Sit-up-straight-Well-heres-a-hardware-project-to-help-with-that</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/e1f440fb-23fe-40c3-a39f-cc8c31a3b62e.png" height="85" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/2cc0eb21-cd67-4940-87c8-a3256f8447bb.png" height="186" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>5</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/Mom-always-said-Sit-up-straight-Well-heres-a-hardware-project-to-help-with-that/RSS</wfw:commentRss>
      <category>.NET Micro Framework</category>
      <category>C#</category>
      <category>Coding4Fun</category>
      <category>Hardware</category>
      <category>.Net Gadgeteer</category>
    </item>
  <item>
      <title>.Net Gadgeteer, REST, Cameras, Servos and Windows Phone 7</title>
      <description><![CDATA[<p>Today's Hardware Friday post lets us play with some of our favorite things, .Net Gadgeteer, Servos, REST, Cameras and Windows Phone 7...</p><h2><a href="http://mikedodaro.net/2011/12/22/using-a-servo-with-a-net-gadgeteer-camera-device/" target="_blank">Using a Servo in a .NET Gadgeteer Camera Device</a></h2><blockquote><p>The <strong>Gadgeteer.Interfaces.PWMOutput</strong> interface can support the use of a <strong>servo </strong>to move mechanical parts of a device as needed by applications. This example uses the <strong>Gadgeteer.Interfaces.PWMOutput</strong> interface and a <strong>servomechanism</strong> to turn a camera through an arc of about 140 degrees. The <strong>Pulse Width Modulation</strong> (PWM) input for this servo is obtained from a <strong>WCF REST Web service</strong> running on a remote IIS Server. The user can direct the camera to take pictures over its range of motion from any device that can send a Web request to the service. After the camera takes a picture, the device generates a POST request to upload the picture to the Web service so it is accessible remotely. The post: <a href="http://wp.me/p1TEdE-eP">Controlling the Servo using a Windows Phone Application</a> describes a client application for the device and Web service.</p><p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/UZ_VyXzHy5s&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/UZ_VyXzHy5s&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p><p>...</p><p>The core of this application is the code that polls the Web Service to get the PWM number that controls the servo. The number is a percentage of the delta between the top and bottom PWM settings, an unsigned integer that indicates a percentage of the range: 1% - 100%. The Web service returns the number to the application to be used in the <strong>SetPulse</strong> method of the <strong>Gadgeteer.Interfaces.PWMOutput </strong>interface.</p><p>Wiring the servo requires connecting the input wire to a pin on a <a href="http://gadgeteer.codeplex.com/wikipage?title=Socket%20Type%20P&amp;version=2">P socket </a>that supports pulse width modulation. The external power for the servo motor has to come from an external battery or transformer that supplies about 5 volts DC. The socket connections can be wired using the <a href="http://www.ghielectronics.com/catalog/product/273">GHI Electronics Extender Module</a>.</p><p><code>uint</code> <code>pulse = low &#43; (delta * percent / 100);</code></p><p><code>servo.SetPulse(20000000, pulse);</code></p><p>Here is a schematic of the servo-control circuit from the <strong>GHI Electronics Extender</strong> module. Following the schematic, a photo shows the wiring. Only pin 9 and the ground on pin 10 are needed for the PWM circuit.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B2%5D-42.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb-41.png" alt="image" width="311" height="407" border="0"></a></p><p>Implementing a REST Web service can be done with the WCF REST Web Service Template 4.0. For more information on using the template project, see <a href="http://wp.me/p1TEdE-5L">REST Web Service to Record Data from a .NET Gadgeteer Sensor Device</a> and <a href="http://wp.me/p1TEdE-7m">Remote Control of .NET Gadgeteer Device via REST Web Service</a>.</p><p>...</p><p>The Web service code that receives the picture from the camera module is shown in the following blocks. Implementing the Web service to manage state information was easy, but getting the bitmap data into a format that works on this service took some discussion. Marco Minerva is skilled in this area and provided some of this code in a discussion that you can follow on an <a href="http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/bd984f1d-640e-46c0-8bbf-598fafd4f39d/">MSDN WCF forum thread</a>.</p><p>First the classes to store data and maintain state:</p><p>...</p><p>The <a href="http://visualstudiogallery.msdn.microsoft.com/fbc7e5c1-a0d2-41bd-9d7b-e54c845394cd">WCF REST Web service template 4.0</a> works fine for the GET and for the POST methods.</p><p>The Web.config file for the Web service follows.</p><p><code><pre class="brush: xml">&lt;?xml version=&quot;1.0&quot;?&gt;

&lt;configuration&gt;
&lt;system.web&gt;
&lt;compilation debug=&quot;true&quot; targetFramework=&quot;4.0&quot; /&gt;
&lt;/system.web&gt;
&lt;system.webServer&gt;
&lt;modules runAllManagedModulesForAllRequests=&quot;true&quot;&gt;
&lt;add name=&quot;UrlRoutingModule&quot; type=&quot;System.Web.Routing.UrlRoutingModule, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&quot; /&gt;
&lt;/modules&gt;
&lt;/system.webServer&gt;
&lt;system.serviceModel&gt;
&lt;serviceHostingEnvironment aspNetCompatibilityEnabled=&quot;true&quot; multipleSiteBindingsEnabled=&quot;true&quot;/&gt;
&lt;standardEndpoints&gt;
&lt;webHttpEndpoint&gt;

&lt;!--
Configure the WCF REST service base address via the global.asax.cs file and the default endpoint via the attributes on the &lt;standardEndpoint&gt; element below
--&gt;

&lt;standardEndpoint name=&quot;&quot; helpEnabled=&quot;true&quot;
automaticFormatSelectionEnabled=&quot;true&quot; maxReceivedMessageSize=&quot;4194304&quot;
transferMode=&quot;Buffered&quot; /&gt;
&lt;/webHttpEndpoint&gt;
&lt;/standardEndpoints&gt;
&lt;/system.serviceModel&gt;
&lt;/configuration&gt;
</pre></code></p><p>For more information about the WCF Web services, see the forum discussion:</p><p>...</p></blockquote><h2><a href="http://mikedodaro.net/2012/01/06/controlling-the-servo-using-a-windows-phone-application/" target="_blank">Controlling the Servo using a Windows Phone application</a></h2><blockquote><p>In the post <a href="http://mikedodaro.net/2011/12/22/using-a-servo-with-a-net-gadgeteer-camera-device/">Using a Servo in a .NET Gadgeteer Camera Device</a> we saw how to create a .NET Gadgeteer application that uses a Servo to change the direction of the Camera, takes a photo and uploads it to a Web Service. Now, we’ll realize a <strong>Windows Phone application</strong> to remotely control the camera and show the pictures.</p><p>Let’s create a standard Windows Phone Application, named <strong>CameraControl</strong>, targeting OS version 7.1 (Mango). We use too <a href="http://silverlight.codeplex.com/">Silverlight for Windows Phone Toolkit</a>, that can be downloaded from CodePlex site. The user interface is very simple and consists of an area where the last taken photo is shown and a slider with which we can control the direction of the camera:</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/wp7%5B2%5D.png" target="_blank"><img title="wp7" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/wp7_thumb.png" alt="wp7" width="284" height="407" border="0"></a></p><p>...</p><p>The application is developed using the <strong>MVVM</strong> pattern. We have only one <strong>ViewModel</strong>, called <em>MainViewModel</em>. It uses the REST Web Service already described in the post <a href="http://mikedodaro.net/2011/12/22/using-a-servo-with-a-net-gadgeteer-camera-device/">Using a Servo in a .NET Gadgeteer Camera Device</a>: in particular, the method to set the state of the servo and the one to get the last taken picture. Note that, to set the servo state, we need to send to the service a number that is a percentage of the delta between the top and bottom PWM settings. It’s an unsigned integer that indicates a percentage of the range: 1% – 100%. Communications are realized using <a href="http://restsharp.org/">RestSharp</a>, a library that simplifies the process of making requests and processing REST responses in an asynchronous way.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/wp7-2%5B2%5D.png" target="_blank"><img title="wp7-2" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/wp7-2_thumb.png" alt="wp7-2" width="219" height="407" border="0"></a></p></blockquote><p>And of course the source is available for download...</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/.net+gadgeteer/RSS&WT.dl=0&WT.entryid=Entry:RSSView:b1c338dee9304e52aa5ea025013d0026">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Net-Gadgeteer-REST-Cameras-Servos-and-Windows-Phone-7</comments>
      <itunes:summary>Today&#39;s Hardware Friday post lets us play with some of our favorite things, .Net Gadgeteer, Servos, REST, Cameras and Windows Phone 7... Using a Servo in a .NET Gadgeteer Camera DeviceThe Gadgeteer.Interfaces.PWMOutput interface can support the use of a servo to move mechanical parts of a device as needed by applications. This example uses the Gadgeteer.Interfaces.PWMOutput interface and a servomechanism to turn a camera through an arc of about 140 degrees. The Pulse Width Modulation (PWM) input for this servo is obtained from a WCF REST Web service running on a remote IIS Server. The user can direct the camera to take pictures over its range of motion from any device that can send a Web request to the service. After the camera takes a picture, the device generates a POST request to upload the picture to the Web service so it is accessible remotely. The post: Controlling the Servo using a Windows Phone Application describes a client application for the device and Web service.  ... The core of this application is the code that polls the Web Service to get the PWM number that controls the servo. The number is a percentage of the delta between the top and bottom PWM settings, an unsigned integer that indicates a percentage of the range: 1% - 100%. The Web service returns the number to the application to be used in the SetPulse method of the Gadgeteer.Interfaces.PWMOutput interface. Wiring the servo requires connecting the input wire to a pin on a P socket that supports pulse width modulation. The external power for the servo motor has to come from an external battery or transformer that supplies about 5 volts DC. The socket connections can be wired using the GHI Electronics Extender Module. uint pulse = low &amp;#43; (delta * percent / 100); servo.SetPulse(20000000, pulse); Here is a schematic of the servo-control circuit from the GHI Electronics Extender module. Following the schematic, a photo shows the wiring. Only pin 9 and the ground on pin 10 are needed for the PWM c</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/Net-Gadgeteer-REST-Cameras-Servos-and-Windows-Phone-7</link>
      <pubDate>Fri, 06 Apr 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Net-Gadgeteer-REST-Cameras-Servos-and-Windows-Phone-7</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/1fe10ff6-ff31-41ba-b028-27c72a651cbe.png" height="68" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/1a0ee204-5c57-4377-b080-a1c76b90a861.png" height="149" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/Net-Gadgeteer-REST-Cameras-Servos-and-Windows-Phone-7/RSS</wfw:commentRss>
      <category>Coding4Fun</category>
      <category>REST</category>
      <category>.Net Gadgeteer</category>
    </item>
  <item>
      <title>Teaching .NET Gadgeteering</title>
      <description><![CDATA[<p>I dig the idea of how &quot;teachable&quot; .NET Gadgeteer development can be. They let the students and teachers focus on bigger picture of creation and not the minutiae (which is important, but...).</p><p>So when I saw this, while there's no Solutions or direct code to download, I still thought this a great Hardware Friday post...</p><h2><a href="https://www.facultyresourcecenter.com/curriculum/pfv.aspx?ID=8939&amp;c1=en-us&amp;c2=0&amp;Login=&amp;wa=wsignin1.0" target="_blank">.NET Gadgeteer School Lesson Plans</a></h2><blockquote><p>.NET Gadgeteer can be used in schools to help students make gadgets and learn C# programming along the way. These lesson plans give teachers all the material you will need to run 8 1-hour sessions using .NET Gadgeteer. You will also need the hardware, details of which are given at <a href="http://netmf.com/gadgeteer">http://netmf.com/gadgeteer</a>.</p><p>The material consists of 8 sessions:</p><ul><li>Session 1: A basic digital camera </li><li>Session 2: Extending the camera (part 1) </li><li>Session 3: Extending the camera (part 2) </li><li>Session 4: Creating a stop watch </li><li>Session 5: Extending the stop watch </li><li>Session 6: Create a simple game (part 1) </li><li>Session 7: Create a simple game (part 2) </li><li>Session 8: Create a simple game (part 3) </li></ul></blockquote><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B3%5D-41.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B1%5D-49.png" alt="image" width="287" height="209" border="0"></a></p><blockquote><h3>Session 1: A basic digital camera</h3><h4>Aim of session</h4><p>The aim of the first session is to</p><p>- put together the hardware components needed to make a basic digital camera</p><p>- write the code needed to create a basic digital camera</p><h4>Learning Outcomes</h4><p>At the end of this session, pupils will be able to:</p><p>- Identify input, output and storage devices on everyday devices</p><p>- Identify and put together the hardware components for a digital camera</p><p>- Understand that in C# the execution of programming code is triggered by events</p><p>- Be able to write simple lines of code to enable the camera to work.</p><h4>Starter task: input, output and storage devices (10 minutes)</h4><p>Show students some pictures of devices such as phones, cameras, music players etc ask them to brainstorm what input, output and storage devices these everyday devices might use.</p><h4>Main session</h4><p>The structure of the session is as follows</p><p>1. Identify hardware components</p><p>2. Assemble digital camera</p><p>3. Use Gadgeteer Designer to drag and drop components on screen</p><p>4. Write the programming code for the camera</p></blockquote><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B6%5D-32.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B2%5D-42.png" alt="image" width="650" height="315" border="0"></a></p><blockquote><h3>Session 2: Extending the camera</h3><h4>Aim of session</h4><p>The aim of this session is to</p><p>- Extend the digital camera to use the LED to indicate when the camera can take a picture</p><p>- Further extend the digital camera to save pictures to an SD Card.</p><h4>Learning Outcomes</h4><p>At the end of this session, pupils will be able to:</p><p>- Be able to add new modules to the digital camera</p><p>- Be able to explore and select appropriate methods for the multi-coloured LED and SD Card.</p><p>- Be able to write to the SD Card</p><p>- Be able to write code to create a new field (data attribute) and increment it in C#</p><p>- Be able to concatenate a string, including converting an unsigned integer to a string.</p><h4>Starter task: functions of a digital camera</h4><p>Look at a “proper” digital camera and brainstorm what its functions are. Students could discuss in groups what else their Gadgeteer camera could do, considering the modules available in the kit.</p><h4>Main session</h4><p>The structure of the session is as follows</p><p>1. Add an LED to the hardware and to the Designer software</p><p>2. Implement the functionality to have the LED turn green when the program starts then momentarily turn red when the camera is busy.</p><p>3. Add an SD Card to the hardware and to the Designer Software</p><p>4. Implement the functionality to save the pictures to an SD Card</p><p>5. Implement the functionality to save pictures with unique names</p></blockquote><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B12%5D-21.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B4%5D-34.png" alt="image" width="650" height="231" border="0"></a></p><p>Through to session 8...</p><blockquote><h3>Session 8: Creating a simple game controlled by a joystick (final part)</h3><h4>Aim of session</h4><p>The aim of this session is to</p><p>- Complete the joystick ball-in-a-box game, consolidating previous skills</p><p>- Encourage students to explore how they could implement their own ideas for a gadget</p><p>Learning outcomes</p><p>- Students should be consolidate everything they have learned in the previous sessions</p><h4>Session Plan</h4><h5>Starter</h5><p>Ask students to recap what they have learned so far. For example, you could ask if they can tell you:</p><p>- How to put a new component on to the mainboard and replicate it in the designer</p><p>- How to write an if statement in C#</p><p>- How to add a new font to Gadgeteer</p><p>- How the timer works</p><p>- How to declare a whole number</p><p>- How to add one to a whole number</p><h5>Main session</h5><p>The activities which the students can do to finish the game are:</p><p>1. Create a new timer to count down from 60 to 0 and display on the screen</p><p>2. Start the game by touching the screen</p><p>3. Display a Game Over message with the final score when the time is up!</p></blockquote><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B9%5D-14.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B3%5D-38.png" alt="image" width="650" height="232" border="0"></a></p><p>If you're looking to learn or teach hardware/software development this looks like a great resource that's very approachable&nbsp;...</p><p>Here’s a few more links you might find interesting:</p><ol><li><a href="http://www.netmf.com/gadgeteer/">Gadgeteer</a>&nbsp; </li><li><a href="http://www.netmf.com/gadgeteer/curriculum.aspx" target="_blank">For Educators</a> </li><li><a href="http://www.netmf.com/gadgeteer/get-started.aspx" target="_blank">Getting Started</a> </li><li><a href="http://www.netmf.com/gadgeteer/showcase.aspx?showcaseid=2" target="_blank">Featured Projects</a> </li></ol><p>&nbsp;</p><p>Page image courtesy of <a href="http://www.netmf.com/gadgeteer/teaching-programming-with-microsoft-net-gadgeteer--a-case-study.aspx" target="_blank">Teaching Programming with Microsoft .NET Gadgeteer – A Case Study</a></p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/.net+gadgeteer/RSS&WT.dl=0&WT.entryid=Entry:RSSView:d078d794b2944f54b979a01d01419449">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Teaching-NET-Gadgeteering</comments>
      <itunes:summary>I dig the idea of how &amp;quot;teachable&amp;quot; .NET Gadgeteer development can be. They let the students and teachers focus on bigger picture of creation and not the minutiae (which is important, but...). So when I saw this, while there&#39;s no Solutions or direct code to download, I still thought this a great Hardware Friday post... .NET Gadgeteer School Lesson Plans.NET Gadgeteer can be used in schools to help students make gadgets and learn C# programming along the way. These lesson plans give teachers all the material you will need to run 8 1-hour sessions using .NET Gadgeteer. You will also need the hardware, details of which are given at http://netmf.com/gadgeteer. The material consists of 8 sessions: Session 1: A basic digital camera Session 2: Extending the camera (part 1) Session 3: Extending the camera (part 2) Session 4: Creating a stop watch Session 5: Extending the stop watch Session 6: Create a simple game (part 1) Session 7: Create a simple game (part 2) Session 8: Create a simple game (part 3)  Session 1: A basic digital cameraAim of sessionThe aim of the first session is to - put together the hardware components needed to make a basic digital camera - write the code needed to create a basic digital camera Learning OutcomesAt the end of this session, pupils will be able to: - Identify input, output and storage devices on everyday devices - Identify and put together the hardware components for a digital camera - Understand that in C# the execution of programming code is triggered by events - Be able to write simple lines of code to enable the camera to work. Starter task: input, output and storage devices (10 minutes)Show students some pictures of devices such as phones, cameras, music players etc ask them to brainstorm what input, output and storage devices these everyday devices might use. Main sessionThe structure of the session is as follows 1. Identify hardware components 2. Assemble digital camera 3. Use Gadgeteer Designer to drag and drop components o</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/Teaching-NET-Gadgeteering</link>
      <pubDate>Fri, 30 Mar 2012 13:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Teaching-NET-Gadgeteering</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/765ea00b-f015-4c6e-a80f-ea16c2ac6b16.png" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/cb1765e8-deb2-4473-b15c-a8fc309a570b.png" height="164" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/Teaching-NET-Gadgeteering/RSS</wfw:commentRss>
      <category>.NET Micro Framework</category>
      <category>Coding4Fun</category>
      <category>.Net Gadgeteer</category>
    </item>
  <item>
      <title>Snake away with a .NET Gadgeteer arcade console and Snake game</title>
      <description><![CDATA[<p>Hardware Friday's have been pretty .Net Gadgeteer focused lately, I know. Next week I'll dig through my story archive list and find something different, but being a child of the 80's I couldn't resist this project. I've always wanted my own arcade console, and while this isn't an Asteroids or Ms PacMan, the fact that you build the hardware and code it up from the ground floor almost makes it better... (well... almost... <img src='http://ecn.channel9.msdn.com/o9/content/images/emoticons/emotion-1.gif?v=c9' alt='Smiley' /></p><h2><a href="http://www.netmf.com/showcase.aspx?ShowcaseID=2&amp;id=120" target="_blank">.NET Gadgeteer Arcade Console</a></h2><blockquote><p>Relive the days of classic arcade games with this gorgeous do-it-yourself miniature arcade console. It’s equipped with a touch screen, joystick and Ethernet port for fun multiplayer action! Pay tribute to your favorite classic game or invent your own!</p><p>The Arcade console is an implementation of the Snake video game. There are many versions of this game. In this version the .NET Gadgeteer Display T35 module and .NET Gadgeteer Timer are used to display the snake and a pellet of food and to move them around the display window. A joystick sends user input that controls the movement of the snake. The object of the game is to move the snake into a collision with the food pellet, which makes the snake grow longer.</p><p>The code for the Arcade console demonstrates many features of the Display T35 module, the .NET Gadgeteer WPF Window class, and .NET Micro Framework Canvas class. The implementation of the GameEngine, GameCanvas, and Sprite classes illustrates the use of bitmap resources and drawing on the canvas. Two timers are running while the game is in progress. One timer randomly advances the food pellet and another moves the snake as directed by the user from the joystick. Math classes are used in the positioning of the sprites.</p><p>The C# program runs on a GHI Electronics Fez Spider mainboard powered by the Dual Power module, which can be used with a battery or USB power. The USB connection must be connected initially to deploy assemblies to the mainboard. An Ethernet module is included to support extensibility for multiple players.</p><p>Code for MicroSnake game: <a href="http://www.netmf.com/uploads/docs/Kerry H/MicroSnake.zip">MicroSnake.zip</a></p><p>Laser cut enclosure (Ponoko-ready): <a href="http://www.netmf.com/uploads/docs/Kerry H/Arcade_Cabinet_Enclosure.zip">Arcade_Cabinet_Enclosure.zip</a></p></blockquote><p><a href="http://www.youtube.com/watch?v=pscenYHbOJ8&amp;feature=player_detailpage">http://www.youtube.com/watch?v=pscenYHbOJ8&amp;feature=player_detailpage</a></p><p>Here's a snip of the hardware design;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B3%5D-38.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb%5B1%5D-46.png" alt="image" width="597" height="427" border="0"></a></p><p>And a code snip;</p><p><pre class="brush: csharp">using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Presentation;
using Microsoft.SPOT.Presentation.Controls;
using Microsoft.SPOT.Presentation.Media;
using Microsoft.SPOT.Touch;

using Gadgeteer.Networking;
using GT = Gadgeteer;
using GTM = Gadgeteer.Modules;

using Gadgeteer.GameEngine;
using Gadgeteer.Modules.GHIElectronics;

namespace MicroSnake
{
    public partial class Program
    {
        const int GAME_GRID_SIZE = 20;

        Window mainWindow;
        GameEngine gameEngine;
        Gadgeteer.Timer drawTimer;
        Gadgeteer.Timer inputTimer;

        Sprite food = new Sprite(Resources.GetBitmap(Resources.BitmapResources.Food_20x20), 160, 200, true);
        SpriteCollection snake = new SpriteCollection();
        Bitmap snakeBitmap = Resources.GetBitmap(Resources.BitmapResources.SnakeBlueBody_20x20);

        void ProgramStarted()
        {
            // Initialize event handlers here.
            // e.g. button.ButtonPressed &#43;= new GTM.MSRC.Button.ButtonEventHandler(button_ButtonPressed);
            mainWindow = display.WPFWindow;

            gameEngine = new GameEngine(mainWindow);

            drawTimer = new GT.Timer(new TimeSpan(0, 0, 0, 0, 400));
            drawTimer.Tick &#43;= new GT.Timer.TickEventHandler(drawTimer_Tick);

            inputTimer = new GT.Timer(new TimeSpan(0, 0, 0, 0, 100));
            inputTimer.Tick &#43;= new GT.Timer.TickEventHandler(inputTimer_Tick);

            CurrentDirection = Direction.Right;
            SetupGame();

            inputTimer.Start();
            drawTimer.Start();

            // Do one-time tasks here
            Debug.Print(&quot;Program Started&quot;);
        }

        void inputTimer_Tick(GT.Timer timer)
        {
            GTM.GHIElectronics.Joystick.Position jPos = joystick.GetJoystickPostion();

            if (0.3 &lt; jPos.Y &amp;&amp; jPos.Y &lt; 0.7)
            {
                if (jPos.X &gt; 0.8)
                {
                    if (CurrentDirection != Direction.Left)
                    {
                        CurrentDirection = Direction.Right;
                    }
                }
                else if (jPos.X &lt; 0.2)
                {
                    if (CurrentDirection != Direction.Right)
                    {
                        CurrentDirection = Direction.Left;
                    }
                }
            }

            if (0.3 &lt; jPos.X &amp;&amp; jPos.X &lt; 0.7)
            {
                if (jPos.Y &gt; 0.8)
                {
                    if (CurrentDirection != Direction.Down)
                    {
                        CurrentDirection = Direction.Up;
                    }
                }
                else if (jPos.Y &lt; 0.2)
                {
                    if (CurrentDirection != Direction.Up)
                    {
                        CurrentDirection = Direction.Down;
                    }
                }
            }
        }
</pre></p><p>This is just another example that building hardware you can code to, or code that you can build hardware for, is probably easier, faster and more fun than you think.</p> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/.net+gadgeteer/RSS&WT.dl=0&WT.entryid=Entry:RSSView:3f611a7bea7a497f87baa001013ef09b">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Snake-away-with-a-NET-Gadgeteer-arcade-console-and-Snake-game</comments>
      <itunes:summary>Hardware Friday&#39;s have been pretty .Net Gadgeteer focused lately, I know. Next week I&#39;ll dig through my story archive list and find something different, but being a child of the 80&#39;s I couldn&#39;t resist this project. I&#39;ve always wanted my own arcade console, and while this isn&#39;t an Asteroids or Ms PacMan, the fact that you build the hardware and code it up from the ground floor almost makes it better... (well... almost...  .NET Gadgeteer Arcade ConsoleRelive the days of classic arcade games with this gorgeous do-it-yourself miniature arcade console. It’s equipped with a touch screen, joystick and Ethernet port for fun multiplayer action! Pay tribute to your favorite classic game or invent your own! The Arcade console is an implementation of the Snake video game. There are many versions of this game. In this version the .NET Gadgeteer Display T35 module and .NET Gadgeteer Timer are used to display the snake and a pellet of food and to move them around the display window. A joystick sends user input that controls the movement of the snake. The object of the game is to move the snake into a collision with the food pellet, which makes the snake grow longer. The code for the Arcade console demonstrates many features of the Display T35 module, the .NET Gadgeteer WPF Window class, and .NET Micro Framework Canvas class. The implementation of the GameEngine, GameCanvas, and Sprite classes illustrates the use of bitmap resources and drawing on the canvas. Two timers are running while the game is in progress. One timer randomly advances the food pellet and another moves the snake as directed by the user from the joystick. Math classes are used in the positioning of the sprites. The C# program runs on a GHI Electronics Fez Spider mainboard powered by the Dual Power module, which can be used with a battery or USB power. The USB connection must be connected initially to deploy assemblies to the mainboard. An Ethernet module is included to support extensibility for multiple players.</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/Snake-away-with-a-NET-Gadgeteer-arcade-console-and-Snake-game</link>
      <pubDate>Fri, 02 Mar 2012 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Snake-away-with-a-NET-Gadgeteer-arcade-console-and-Snake-game</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/44f6aef2-bca2-47ff-9a9b-34dd4251137c.png" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/2bfa4d99-ba79-431e-a738-ffc7032f43ab.png" height="165" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>0</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/Snake-away-with-a-NET-Gadgeteer-arcade-console-and-Snake-game/RSS</wfw:commentRss>
      <category>.NET Micro Framework</category>
      <category>Coding4Fun</category>
      <category>.Net Gadgeteer</category>
    </item>
  <item>
      <title>Flip out with this .Net Gadgeteer Flipbook Maker</title>
      <description><![CDATA[<p>Today's Hardware Friday post shows us how we can use the .Net Micro Framework and the .Net Gadgeteer to build a simple Flipbook Maker. It shows that if &quot;hardware&quot; scared you in the past that the .Net Gadgeteer is the cure to that fear, that building cool things is nothing to be afraid of now... So start building!</p><h2><a href="http://blogs.msdn.com/b/net_gadgeteer/archive/2011/12/18/how-to-build-a-flipbook-maker-part-1.aspx" target="_blank">How to Build a Flipbook Maker: Part 1</a>, <a href="http://blogs.msdn.com/b/net_gadgeteer/archive/2011/12/21/how-to-build-a-flipbook-maker-part-2.aspx" target="_blank">Part 2</a>, <a href="http://blogs.msdn.com/b/net_gadgeteer/archive/2012/01/03/how-to-build-a-flipbook-maker-part-3.aspx" target="_blank">Part 3</a> (<a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-25-29-10/FlipbookMaker.zip" target="_blank">Complete Project Source</a>)</h2><blockquote><p>Build your own stop-motion animation tool using .NET Gadgeteer! The Flipbook Maker combines Gadgeteer's intuitive hardware and software construction with a useful enclosure to create a project that will appeal to your inner cartoonist.</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image%5B2%5D-36.png" target="_blank"><img title="image" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/image_thumb-35.png" alt="image" width="407" height="407" border="0"></a></p><h3>What You'll Need</h3><p>This walkthrough uses modules from GHI Electronics' Fez Spider Starter Kit. Other mainboards and modules can be substituted - just check that your modules will work with the sockets on your mainboard. You can quickly determine whether a module will work with a mainboard by matching the module's socket type letter with the socket type letters on each mainboard socket.</p><p>Hardware Modules Used:</p><ul><li>Mainboard </li><li>Camera Module </li><li>Potentiometer Module </li><li>Button Module </li><li>SD Card Module (plus an SD card - check your module to determine its card size and capacity requirements) </li><li>USBClient power module </li></ul><p>You'll also need a Gadgeteer development environment. Check out this <a href="http://www.netmf.com/gadgeteer/get-started.aspx">guide</a> which describes how to set that up.</p><p>Finally, if you want to assemble your Flipbook Maker as pictured here, you'll need to create an enclosure for it. We'll talk about fabrication options in a later post - including stuff you can do yourself and services you can use to have the case constructed for you.</p><ul><li>Step 1: Connect the Modules </li><li>Step 2: Starting the Software </li></ul></blockquote><h3><a href="http://blogs.msdn.com/b/net_gadgeteer/archive/2011/12/21/how-to-build-a-flipbook-maker-part-2.aspx" target="_blank">Part 2</a></h3><blockquote><p>In <a href="http://blogs.msdn.com/b/net_gadgeteer/archive/2011/12/18/how-to-build-a-flipbook-maker-part-1.aspx">Part 1</a>, we assembled the hardware and created the event handlers for the Flipbook Maker. Now let's flesh out the software foundation and create a state machine to manage the Flipbook Maker's behavior.</p><ul><li>Storing Images </li><li>Flipbook Maker Playback States </li><li>Implementing the Playback Timer </li><li>Taking Pictures </li><li>Implementing the Potentiometer Timer </li><li>The Flipbook Maker to So Far and What's Next </li></ul></blockquote><h3><a href="http://blogs.msdn.com/b/net_gadgeteer/archive/2012/01/03/how-to-build-a-flipbook-maker-part-3.aspx" target="_blank">Part 3</a></h3><blockquote><p>Happy New Year! The Gadgeteer team is back from the holidays and we'll conclude the Flipbook Maker series this week. In <a href="http://blogs.msdn.com/b/net_gadgeteer/archive/2011/12/18/how-to-build-a-flipbook-maker-part-1.aspx">Part 1</a> and <a href="http://blogs.msdn.com/b/net_gadgeteer/archive/2011/12/21/how-to-build-a-flipbook-maker-part-2.aspx">Part 2</a> we assembled the hardware and built the basic software architecture. This post covers using WPF to create a menuing system for the touchscreen display. This will provide the remaining user controls - saving the movie to the SD card, deleting a frame, etc. It will also provide visual cues like frame number and playback status.</p><ul><li>Adding Resource Images and Fonts to the Project </li><li>Setting Up the Display </li><li>A Note on Implementing Lightweight Touch Buttons in Gadgeteer </li><li>The Touch Event Handlers </li><li>The Home Stretch: Saving the Movie </li></ul></blockquote><p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/Ik-r_chs5tU&hl=en"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/Ik-r_chs5tU&hl=en" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p><p>I think one of the cooler things about .Net Gadgeteer is the development environment. Even if you don't have the hardware (which I don't) you can still install the SDK's (see this <a href="http://www.netmf.com/gadgeteer/get-started.aspx">guide</a>) and check out the hardware design and associated code. There's no .Net Gadgeteer emulator that I am aware of, so to run the code you'll need the hardware, but still...</p><p>Here's the Solution open on my system;</p><p><a href="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML1455c5d8%5B3%5D.png" target="_blank"><img title="SNAGHTML1455c5d8" src="http://files.channel9.msdn.com/wlwimages/ae054c0b4d7b402ab1239e6800c0220f/SNAGHTML1455c5d8_thumb.png" alt="SNAGHTML1455c5d8" width="650" height="360" border="0"></a></p><p>Some snips of code, though I recommend you check out the three different posts as there's more snips there, with assoicated context...</p><p><pre class="brush: csharp">// This method is run when the mainboard is powered up or reset.   
  void ProgramStarted()
  {
      // Set up event handlers for modules
      button.ButtonPressed &#43;= new GTM.GHIElectronics.Button.ButtonEventHandler(button_ButtonPressed);
      camera.BitmapStreamed &#43;= new GTM.GHIElectronics.Camera.BitmapStreamedEventHandler(camera_BitmapStreamed);

      sdCard.SDCardMounted &#43;= new SDCard.SDCardMountedEventHandler(sdCard_SDCardMounted);
      sdCard.SDCardUnmounted &#43;= new GTM.GHIElectronics.SDCard.SDCardUnmountedEventHandler(sdCard_SDCardUnmounted);

      SetupDisplay();

      // Set up event handlers for timers, and start timers running
      playbackTimer.Tick &#43;= new GT.Timer.TickEventHandler(playbackTimer_Tick);
      playbackTimer.Start();

      potentiometerCheckTimer.Tick &#43;= new Gadgeteer.Timer.TickEventHandler(potentiometerCheckTimer_Tick);
      potentiometerCheckTimer.Start();

      // Use Debug.Print to show messages in Visual Studio's &quot;Output&quot; window during debugging.
      Debug.Print(&quot;Program Started&quot;);
  }

void button_ButtonPressed(GTM.GHIElectronics.Button sender, GTM.GHIElectronics.Button.ButtonState state)
   {
       if (!camera.CameraReady) return;

       if (frames.Count &lt;= MAXIMUM_FRAMES)
       {
           if (playbackTimer.IsRunning) playbackTimer.Stop();
           if (potentiometerCheckTimer.IsRunning) potentiometerCheckTimer.Stop();
           currentFrame&#43;&#43;;
           currentMode = PlaybackMode.Recording;
           cameraImage.Bitmap = new Bitmap((int)display.Width, (int)display.Height); // Give the camera and screen a new bitmap to stream to.
           camera.StartStreamingBitmaps(cameraImage.Bitmap);
       }

   }

   Image icon;
   Text frameNumber;
   Canvas canvas;
   Window mainWindow;

   ArrayList buttons = new ArrayList();
   Image deleteThisButton = new Image(Resources.GetBitmap(Resources.BitmapResources.DeleteThisButton));
   Image deleteAllButton = new Image(Resources.GetBitmap(Resources.BitmapResources.DeleteAllButton));
   Image saveButton = new Image(Resources.GetBitmap(Resources.BitmapResources.SaveButton));
   Image cancelButton = new Image(Resources.GetBitmap(Resources.BitmapResources.CancelButton));

   bool buttonsVisible = false;

   void SetupDisplay()
   {
       mainWindow = display.WPFWindow;
       canvas = new Canvas();
       cameraImage = new Image(Resources.GetBitmap(Resources.BitmapResources.StartScreen));
       frames.Add(cameraImage.Bitmap);
       icon = new Image(Resources.GetBitmap(Resources.BitmapResources.CALIBRATE));
       frameNumber = new Text(Resources.GetFont(Resources.FontResources.SegoeUI_20), &quot;&quot;);
       frameNumber.ForeColor = GT.Color.FromRGB(0, 200, 0);

       canvas.Children.Add(cameraImage);
       canvas.Children.Add(icon);
       canvas.Children.Add(frameNumber);

       canvas.Width = (int)display.Width;
       canvas.Height = (int)display.Height;

       Canvas.SetLeft(cameraImage, 0);
       Canvas.SetTop(cameraImage, 0);

       Canvas.SetRight(frameNumber, 5);
       Canvas.SetTop(frameNumber, 0);

       Canvas.SetLeft(icon, 5);
       Canvas.SetTop(icon, 10);

       // Add and position menu buttons
       canvas.Children.Add(deleteAllButton);
       canvas.Children.Add(deleteThisButton);
       canvas.Children.Add(cancelButton);
       canvas.Children.Add(saveButton);

       Canvas.SetLeft(deleteAllButton, 40);
       Canvas.SetTop(deleteAllButton, 5);
       Canvas.SetLeft(deleteThisButton, 180);
       Canvas.SetTop(deleteThisButton, 5);
       Canvas.SetLeft(saveButton, 40);
       Canvas.SetTop(saveButton, 125);
       Canvas.SetLeft(cancelButton, 180);
       Canvas.SetTop(cancelButton, 125);

       buttons.Add(deleteThisButton);
       buttons.Add(deleteAllButton);
       buttons.Add(saveButton);
       buttons.Add(cancelButton);

       foreach (Image button in buttons)
       {
           button.Visibility = Visibility.Hidden;
       }

       buttonsVisible = false;
       mainWindow.Child = canvas;
   }
</pre></p><p>The .Net Gadgeteer really has made building custom hardware devices and programs almost as simple as building just software only solutions. If you can code but have thought &quot;hardware is hard&quot; you really should check out the .Net Gadgeteer. It's likely easier than you think...</p><p>Here’s a few more links you might find interesting:</p><ul><li><a href="http://blogs.msdn.com/b/net_gadgeteer/archive/2011/12/20/looking-for-api-reference-docs-for-the-core-gadgeteer-libraries.aspx" target="_blank">Looking for API reference docs for the core Gadgeteer libraries?</a> </li><li><a href="http://blogs.msdn.com/b/uk_faculty_connection/archive/2012/01/09/net-gadgeteer-useful-resources-amp-links.aspx" target="_blank">.NET Gadgeteer Useful Resources &amp; Links</a> </li><li><a href="http://www.netmf.com/showcase.aspx?ShowcaseID=2" target="_blank">.Net Micro Framework Showcase: Featured Projects</a> </li><li><a href="http://www.tinyclr.com/support/" target="_blank">TinyCLR/.Net Micro Framework Support</a> (Downloads, Resources, free eBooks, Tutorials, etc) </li></ul> <img src="http://m.webtrends.com/dcs1wotjh10000w0irc493s0e_6x1g/njs.gif?dcssip=channel9.msdn.com&dcsuri=http://channel9.msdn.com/Tags/.net+gadgeteer/RSS&WT.dl=0&WT.entryid=Entry:RSSView:133473f0eb0f46d7bf659ffb017edb41">]]></description>
      <comments>http://channel9.msdn.com/coding4fun/blog/Flip-out-with-this-Net-Gadgeteer-Flipbook-Maker</comments>
      <itunes:summary>Today&#39;s Hardware Friday post shows us how we can use the .Net Micro Framework and the .Net Gadgeteer to build a simple Flipbook Maker. It shows that if &amp;quot;hardware&amp;quot; scared you in the past that the .Net Gadgeteer is the cure to that fear, that building cool things is nothing to be afraid of now... So start building! How to Build a Flipbook Maker: Part 1, Part 2, Part 3 (Complete Project Source)Build your own stop-motion animation tool using .NET Gadgeteer! The Flipbook Maker combines Gadgeteer&#39;s intuitive hardware and software construction with a useful enclosure to create a project that will appeal to your inner cartoonist.  What You&#39;ll NeedThis walkthrough uses modules from GHI Electronics&#39; Fez Spider Starter Kit. Other mainboards and modules can be substituted - just check that your modules will work with the sockets on your mainboard. You can quickly determine whether a module will work with a mainboard by matching the module&#39;s socket type letter with the socket type letters on each mainboard socket. Hardware Modules Used: Mainboard Camera Module Potentiometer Module Button Module SD Card Module (plus an SD card - check your module to determine its card size and capacity requirements) USBClient power module You&#39;ll also need a Gadgeteer development environment. Check out this guide which describes how to set that up. Finally, if you want to assemble your Flipbook Maker as pictured here, you&#39;ll need to create an enclosure for it. We&#39;ll talk about fabrication options in a later post - including stuff you can do yourself and services you can use to have the case constructed for you. Step 1: Connect the Modules Step 2: Starting the Software Part 2In Part 1, we assembled the hardware and created the event handlers for the Flipbook Maker. Now let&#39;s flesh out the software foundation and create a state machine to manage the Flipbook Maker&#39;s behavior. Storing Images Flipbook Maker Playback States Implementing the Playback Timer Taking Pictures Implementing the Pote</itunes:summary>
      <link>http://channel9.msdn.com/coding4fun/blog/Flip-out-with-this-Net-Gadgeteer-Flipbook-Maker</link>
      <pubDate>Fri, 24 Feb 2012 14:00:00 GMT</pubDate>
      <guid isPermaLink="false">http://channel9.msdn.com/coding4fun/blog/Flip-out-with-this-Net-Gadgeteer-Flipbook-Maker</guid>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/70934562-1ea8-4e11-8452-689d777986bd.png" height="75" width="100"></media:thumbnail>
      <media:thumbnail url="http://files.channel9.msdn.com/thumbnail/30e9f86c-9f81-45dc-b6ab-4272322be6c1.png" height="165" width="220"></media:thumbnail>      
      <dc:creator>Greg Duncan</dc:creator>
      <itunes:author>Greg Duncan</itunes:author>
      <slash:comments>1</slash:comments>
      <wfw:commentRss>http://channel9.msdn.com/coding4fun/blog/Flip-out-with-this-Net-Gadgeteer-Flipbook-Maker/RSS</wfw:commentRss>
      <category>.NET Micro Framework</category>
      <category>Coding4Fun</category>
      <category>.Net Gadgeteer</category>
    </item>    
</channel>
</rss>