<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>narainabhishek</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/narainabhishek/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/narainabhishek/feed.xml</link>
    <description>Technology Enthusiast - Windows Devices App Dev,  Cross-platform, Xamarin, HTML5, Client Technologies</description>
    <lastBuildDate>Wed, 17 Apr 2019 04:09:37 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Microsoft IoT Camp–Setup</title>
      <link>https://docs.microsoft.com/archive/blogs/narainabhishek/microsoft-iot-campsetup</link>
      <pubDate>Sun, 13 Mar 2016 23:04:29 GMT</pubDate>
      <dc:creator><![CDATA[Abhishek_Narain]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/narainabhishek/2016/03/13/microsoft-iot-campsetup/</guid>
      <description><![CDATA[This blog is to ensure that you have the appropriate environment setup before your come for the...]]></description>
      <content:encoded><![CDATA[<p>This blog is to ensure that you have the appropriate environment setup before your come for the camp. </p>  <p>To setup your Windows 10 IoT core development PC (machine), you would need:</p>  <ul>   <li>Windows 10 (build 10240) or better      <br /></li>    <li>Visual Studio 2015 – <a href="https://www.visualstudio.com/downloads/download-visual-studio-vs">Community edition</a> is sufficient, Enterprise and Professional works.       <br /><strong>Note:</strong> While you setup Visual Studio, ensure you do C<strong>ustom</strong> install and select the checkbox ‘<strong>Universal Windows App Development Tools</strong> –&gt; <strong>Tools for Windows SDK</strong>’. </li> </ul>  <blockquote>   <p>Below is the screenshot for your reference: </p>    <p><img alt="" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/36/44/4113.setup.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/330x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-36-44/4113.setup.png" /></p>    <p>In case you have previously setup Visual Studio 2015 and Universal Windows Apps templates are missing, you would either need to start the Visual Studio Setup again –&gt; Repair, then select the Universal Windows App Dev. Tools. Or try installing the missing SDK <a href="https://go.microsoft.com/fwlink/p/?LinkId=619296">here</a>. </p> </blockquote>  <ul>   <li>     <p>Windows IoT Core Project Templates. You can download them from <a href="https://visualstudiogallery.msdn.microsoft.com/55b357e1-a533-43ad-82a5-a88ac4b01dec">here</a>. Alternatively, the templates can be found by searching for Windows IoT Core Project Templates in the <a href="https://visualstudiogallery.msdn.microsoft.com/">Visual Studio Gallery</a> or directly from Visual Studio in the Extension and Updates dialog (Tools &gt; Extensions and Updates &gt; Online).         <br /></p>   </li>    <li>     <p>Make sure you’ve <strong>enabled developer mode</strong> in Windows 10 by following <a href="https://msdn.microsoft.com/library/windows/apps/xaml/dn706236.aspx">these instructions</a>.</p>   </li> </ul>  <p>&#160;</p>  <p>That’s it! Now you are all set with the environment. Hope to see you guys at the event. In case you guys want to check out the labs in advance that you would be completing during the camp then you can access it <a href="https://github.com/Psychlist1972/connectthedots/tree/IoT-Field-Labs/Devices/DirectlyConnectedDevices/WindowsIoTCorePi2FezHat">here</a>.</p>  <p>Also please do come with some IoT Idea, that you would like to implement! </p>  <p>Regards,    <br />Abhishek Narain     <br />Technical Evangelist     <br /><a href="https://twitter.com/narainabhishek">@narainabhishek</a></p>]]></content:encoded>
    </item>
    <item>
      <title>The 1st ever Internet of Things (IoT) DevCamp by Microsoft in India</title>
      <link>https://docs.microsoft.com/archive/blogs/narainabhishek/the-1st-ever-internet-of-things-iot-devcamp-by-microsoft-in-india</link>
      <pubDate>Mon, 06 Jul 2015 12:01:57 GMT</pubDate>
      <dc:creator><![CDATA[Abhishek_Narain]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/narainabhishek/2015/07/06/the-1st-ever-internet-of-things-iot-devcamp-by-microsoft-in-india/</guid>
      <description><![CDATA[&#160;  Last month we conducted the 1st ever Internet of Things Camp in India. It was indeed a great...]]></description>
      <content:encoded><![CDATA[<p>&#160;</p>  <p><font size="2">Last month we conducted the 1st ever Internet of Things Camp in India. It was indeed a great experience as this was Hands-on, and attendees enjoyed getting their hands dirty with Development boards, Sensors, Azure, etc.</font>&#160;</p>  <p><font size="2"><em><strong>Why is everyone talking about IoT these days?</strong></em></font></p>  <p><font size="2">Well for those who are new to the IoT world, this is the next big computing revolution and is expected to be bigger than all previous computing markets. IoT is a basically networking of various devices/ machinery, that helps gather data and do analysis on top of that. For Enterprises this helps them cut down on their operating cost, optimize performance, build better customer connect. I am sure you would love to get a call a week in advance (before your engine breaks down) from your car manufacturer letting you know that you car needs servicing based on Engines’ sensor data! Many such scenarios can be stiched through with the Internet Of Things!</font></p>  <p><font size="2">In case you would like to understand how you could use it for your IT you can find more details <a href="https://download.microsoft.com/download/F/0/2/F02F4931-EDFD-490D-B92A-C19B359D4C24/Create_the_Internet_of_Your_Things_Top_10_Benefits.pdf">here</a>.       <br /></font><font size="2">You can find Microsoft’s vision on IoT <a href="https://download.microsoft.com/download/C/F/7/CF78575B-711E-4E1B-8BAB-3ED1657DFA82/Creating_the_Internet_of_Your_Things.pdf">here</a>.&#160; </font></p>  <p><font size="2"><em><strong>About the Event:</strong></em></font></p>  <p><font size="2">We had the event in Bangalore and Mumbai on 25th and 26th of June. We had an awesome audience across both the locations, and their willingness to cling onto the new technology/ platform was great. </font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/65/52/metablogapi/2728.image_79B206CC.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-65-52-metablogapi/2728.image_5F00_79B206CC.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/65/52/metablogapi/8802.image_thumb_24B1A6E5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-65-52-metablogapi/8802.image_5F00_thumb_5F00_24B1A6E5.png" width="244" height="220" /></a></p>  <p><font size="2"><strong>Agenda:</strong></font></p>  <ul>   <li><em><font size="2">IoT overview, architecture, Microsoft platform </font><font size="2">&#160;</font> </em></li>    <li><font size="2"><em>Event Hubs </em></font></li>    <li><em><font size="2">Devices (Arduino UNO, Raspberry Pi, etc.), Sensors (Sparkfun weather shield)</font> </em></li> </ul>  <p><font size="2">We mostly leveraged the <a href="https://msopentech.com/blog/2014/12/10/connecthedots-io/">Open Source Project</a> published by <strong>Microsoft Open Technologies</strong>. This is pretty cool and the code repository is quite frequently updated; hence adding more supported devices to the existing scenario. You can find the source code <a href="https://github.com/msopentech/connectthedots">here</a>. </font></p>  <p><font size="2">We used a Gateway Architecture, Gateway being the <strong>Raspberry Pi</strong> running <strong>Linux</strong> (yes you heard it right; welcome to the new and open Microsoft), which collects data from lighter single threaded Arduino UNO boards with sensors. Most importantly using a Gateway we were able to secure the communication channel between our on premise data collection system and the cloud! Also Raspberry Pi might not directly support Analog sensors as it has digital ports.</font></p>  <p><font size="2">1. We started off with connecting the <strong>Sparkfun Weather Shield</strong> to the <strong>Arduino</strong> <strong>Uno</strong> board. Deployed code to Arduino Uno to Read the sensor data from the Weather shield (Data collection).</font></p>  <p><font size="2">2. Once we were able to send the Weather shield data in JSON format to the serial port, we connected it to Raspberry Pi. Here we deviated a little from Connecting the dots implementation to save some time. Instead of deploying .NET code using Mono on Linux, we used crowds favorite - <strong><em>Python</em></strong>, to directly read and send the data to the cloud from Raspberry Pi. <em>This was fairly simple using the <strong>Azure SDK for Python </strong>(<a href="https://azure.microsoft.com/en-us/documentation/articles/python-how-to-install/">documentation</a>)<strong>.</strong></em> Just a single Line to execute:</font></p>  <p>   <div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:6d86c88a-a3cc-4b5a-a5cf-0545a77fded4" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"><pre style=" width: 470px; height: 19px;background-color:White;overflow: auto;"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
https://www.CodeHighlighter.com/

--><span style="color: #008080;">1</span> <span style="color: #000000;">sudo pip install azure</span></div></pre><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  https://dunnhq.com --></div>

  <br />*Assuming pip is installed</p>

<p><font size="2">3. Using the Azure SDK for Python life becomes easier interacting Azure. This piece is very important as we will be doing the real time analysis on the Cloud. But before we start sending the Data we need to create Events Hub under Azure Service bus, which is capable of ingesting millions of data per second. Post which we can run Stream analytics Job to figure out meaningful insights of the real time data.</font></p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/65/52/metablogapi/8838.image_1772CFE5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-65-52-metablogapi/8838.image_5F00_1772CFE5.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/65/52/metablogapi/7128.image_thumb_46C4456F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-65-52-metablogapi/7128.image_5F00_thumb_5F00_46C4456F.png" width="362" height="292" /></a></p>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/65/52/metablogapi/8508.image_720B6D27.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-65-52-metablogapi/8508.image_5F00_720B6D27.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/65/52/metablogapi/0525.image_thumb_7E9BAAF4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-65-52-metablogapi/0525.image_5F00_thumb_5F00_7E9BAAF4.png" width="360" height="232" /></a></p>

<p><font size="2">The name of the Events Hub, Policy Name, Primary/ Secondary key is what we will need to put it in the code to establish connection with the Events hub.</font></p>

<p>
  <div id="scid:9D7513F9-C04C-4721-824A-2B34F0212519:0d501248-22b8-4f70-8bb2-850564b70cd5" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"><pre style=" width: 470px; height: 327px;background-color:White;overflow: auto;"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
https://www.CodeHighlighter.com/

--><span style="color: #008080;"> 1</span> <span style="color: #0000FF;">import</span><span style="color: #000000;"> serial
</span><span style="color: #008080;"> 2</span> <span style="color: #000000;"></span><span style="color: #0000FF;">from</span><span style="color: #000000;"> azure.servicebus </span><span style="color: #0000FF;">import</span><span style="color: #000000;"> ServiceBusService
</span><span style="color: #008080;"> 3</span> <span style="color: #000000;">
</span><span style="color: #008080;"> 4</span> <span style="color: #000000;">key_name </span><span style="color: #000000;">=</span><span style="color: #800000;">'</span><span style="color: #800000;">RootManageSharedAccessKey</span><span style="color: #800000;">'</span><span style="color: #000000;"> </span><span style="color: #008000;">#</span><span style="color: #008000;"> SharedAccessKeyName from Azure Portal</span><span style="color: #008000;">
</span><span style="color: #008080;"> 5</span> <span style="color: #008000;"></span><span style="color: #000000;">key_value</span><span style="color: #000000;">=</span><span style="color: #800000;">'</span><span style="color: #800000;">wTjYCKkPpP109gzHP49i0WCxPVfvMgHol5eOSO/TBrM=</span><span style="color: #800000;">'</span><span style="color: #000000;"> </span><span style="color: #008000;">#</span><span style="color: #008000;"> SharedAccessKey from$</span><span style="color: #008000;">
</span><span style="color: #008080;"> 6</span> <span style="color: #008000;"></span><span style="color: #000000;">sbs </span><span style="color: #000000;">=</span><span style="color: #000000;"> ServiceBusService(</span><span style="color: #800000;">'</span><span style="color: #800000;">dxiotdemosb</span><span style="color: #800000;">'</span><span style="color: #000000;">, shared_access_key_name</span><span style="color: #000000;">=</span><span style="color: #000000;">key_name, shared_$
</span><span style="color: #008080;"> 7</span> <span style="color: #000000;">sbs.create_event_hub(</span><span style="color: #800000;">'</span><span style="color: #800000;">hubcreationfromlinux</span><span style="color: #800000;">'</span><span style="color: #000000;">)
</span><span style="color: #008080;"> 8</span> <span style="color: #000000;">
</span><span style="color: #008080;"> 9</span> <span style="color: #000000;">deviceId </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">device-10</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">
</span><span style="color: #008080;">10</span> <span style="color: #000000;">serialport </span><span style="color: #000000;">=</span><span style="color: #000000;"> serial.Serial(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">/dev/ttyACM0</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, </span><span style="color: #000000;">9600</span><span style="color: #000000;">)
</span><span style="color: #008080;">11</span> <span style="color: #000000;">
</span><span style="color: #008080;">12</span> <span style="color: #000000;"></span><span style="color: #0000FF;">while</span><span style="color: #000000;"> True:
</span><span style="color: #008080;">13</span> <span style="color: #000000;">    </span><span style="color: #0000FF;">try</span><span style="color: #000000;">:
</span><span style="color: #008080;">14</span> <span style="color: #000000;">        command </span><span style="color: #000000;">=</span><span style="color: #000000;"> serialport.readline()
</span><span style="color: #008080;">15</span> <span style="color: #000000;">        sbs.send_event(</span><span style="color: #800000;">'</span><span style="color: #800000;">hubcreationfromlinux12</span><span style="color: #800000;">'</span><span style="color: #000000;">, str(command))
</span><span style="color: #008080;">16</span> <span style="color: #000000;">        </span><span style="color: #0000FF;">print</span><span style="color: #000000;"> </span><span style="color: #800000;">'</span><span style="color: #800000;">hubcreationfromlinux</span><span style="color: #800000;">'</span><span style="color: #000000;">, str(command)
</span><span style="color: #008080;">17</span> <span style="color: #000000;">    </span><span style="color: #0000FF;">except</span><span style="color: #000000;"> IOError:
</span><span style="color: #008080;">18</span> <span style="color: #000000;">        </span><span style="color: #0000FF;">print</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Error</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">
</span><span style="color: #008080;">19</span> <span style="color: #000000;">
</span><span style="color: #008080;">20</span> <span style="color: #000000;"></span></div></pre><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  https://dunnhq.com --></div>

  <br />If you look at line 7, we are instantiating Event Hub named ‘hubcreationfromlinux’, so all you need to do before is to setup Service bus namespace. </p>

<p><font size="2">4. Analysis of the Data received by the Events Hub – The details can be found in the connecting the dots repository <a href="https://github.com/MSOpenTech/connectthedots/tree/master/Azure">here</a>.</font></p>

<p><font size="2"></font></p>

<p><font size="2">At the end of the day, everyone loved the experience of playing with development boards, and being able to run their code to connect and send data to Azure. In real world the same scenario gets multiplied millions of times to produce tons of data from machinery, devices, etc. But now the attendees understood the basics of Internet of Things a lot better!</font></p>

<p><font size="2">In case you missed the excitement this time, do keep in touch with us by following the <a href="https://blogs.technet.com/b/dxindia/">DX India blog</a> for updates on&#160; more such events!</font></p>

<p><font size="2"></font></p>

<p><font size="2">Regards, 
    <br /></font><font size="2">Abhishek Narain 
    <br />Technical Evangelist 

    <br /></font><font size="2"><a href="https://twitter.com/narainabhishek">@narainabhishek</a></font></p>

<p><font size="2">&#160;</font></p>]]></content:encoded>
    </item>
  </channel>
</rss>