first commit
|
|
@ -0,0 +1,45 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.24720.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloWorldBlinky", "HelloWorldBlinky\HelloWorldBlinky.csproj", "{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{83506936-0E26-44B2-B6E6-3D964961C643}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
README.md = README.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|ARM = Release|ARM
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Debug|x64.Build.0 = Debug|x64
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Debug|x64.Deploy.0 = Debug|x64
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Debug|x86.Build.0 = Debug|x86
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Debug|x86.Deploy.0 = Debug|x86
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Release|ARM.Build.0 = Release|ARM
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Release|x64.ActiveCfg = Release|x64
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Release|x64.Build.0 = Release|x64
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Release|x64.Deploy.0 = Release|x64
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Release|x86.ActiveCfg = Release|x86
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Release|x86.Build.0 = Release|x86
|
||||
{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}.Release|x86.Deploy.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
|
@ -0,0 +1,152 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProjectGuid>{A92D5FB1-8639-4AC3-9766-EDC807C7BD97}</ProjectGuid>
|
||||
<OutputType>winmdobj</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>HelloWorldBlinky</RootNamespace>
|
||||
<AssemblyName>HelloWorldBlinky</AssemblyName>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
||||
<TargetPlatformVersion>10.0.10586.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
|
||||
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
|
||||
<EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<AllowCrossPlatformRetargeting>false</AllowCrossPlatformRetargeting>
|
||||
<PackageCertificateKeyFile>HelloWorldBlinky_TemporaryKey.pfx</PackageCertificateKeyFile>
|
||||
<AppxPackage>true</AppxPackage>
|
||||
<ContainsStartupTask>true</ContainsStartupTask>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\ARM\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>ARM</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
|
||||
<OutputPath>bin\ARM\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>ARM</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>;2008</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
|
||||
<None Include="project.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="StartupTask.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Package.appxmanifest">
|
||||
<SubType>Designer</SubType>
|
||||
</AppxManifest>
|
||||
<None Include="HelloWorldBlinky_TemporaryKey.pfx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Properties\Default.rd.xml" />
|
||||
<Content Include="Assets\LockScreenLogo.scale-200.png">
|
||||
<InProject>false</InProject>
|
||||
</Content>
|
||||
<Content Include="Assets\SplashScreen.scale-200.png">
|
||||
<InProject>false</InProject>
|
||||
</Content>
|
||||
<Content Include="Assets\Square150x150Logo.scale-200.png">
|
||||
<InProject>false</InProject>
|
||||
</Content>
|
||||
<Content Include="Assets\Square44x44Logo.scale-200.png">
|
||||
<InProject>false</InProject>
|
||||
</Content>
|
||||
<Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png">
|
||||
<InProject>false</InProject>
|
||||
</Content>
|
||||
<Content Include="Assets\StoreLogo.png">
|
||||
<InProject>false</InProject>
|
||||
</Content>
|
||||
<Content Include="Assets\Wide310x150Logo.scale-200.png">
|
||||
<InProject>false</InProject>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="GrovePi, Version=1.0.7.0, Culture=neutral, processorArchitecture=ARM">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\GrovePi\bin\ARM\Debug\GrovePi.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '14.0' ">
|
||||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>false</SignAssembly>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<Package
|
||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||
xmlns:iot="http://schemas.microsoft.com/appx/manifest/iot/windows10"
|
||||
IgnorableNamespaces="uap mp iot">
|
||||
|
||||
<Identity
|
||||
Name="HelloWorldBlinky-uwp"
|
||||
Publisher="CN=John"
|
||||
Version="1.0.0.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="480da605-eaa3-49cb-bdab-04fd64e6201f" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
<Properties>
|
||||
<DisplayName>HelloWorldBlinky</DisplayName>
|
||||
<PublisherDisplayName>John</PublisherDisplayName>
|
||||
<Logo>Assets\StoreLogo.png</Logo>
|
||||
</Properties>
|
||||
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="x-generate"/>
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
<Application Id="App">
|
||||
<uap:VisualElements
|
||||
DisplayName="HelloWorldBlinky"
|
||||
Square150x150Logo="Assets\Square150x150Logo.png"
|
||||
Square44x44Logo="Assets\Square44x44Logo.png"
|
||||
Description="HelloWorldBlinky"
|
||||
BackgroundColor="transparent"
|
||||
AppListEntry="none">
|
||||
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
|
||||
<uap:SplashScreen Image="Assets\SplashScreen.png" />
|
||||
</uap:VisualElements>
|
||||
<Extensions>
|
||||
<Extension Category="windows.backgroundTasks" EntryPoint="HelloWorldBlinky.StartupTask">
|
||||
<BackgroundTasks>
|
||||
<iot:Task Type="startup" />
|
||||
</BackgroundTasks>
|
||||
</Extension>
|
||||
</Extensions>
|
||||
</Application>
|
||||
</Applications>
|
||||
|
||||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
</Capabilities>
|
||||
</Package>
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("HelloWorldBlinky")]
|
||||
[assembly: AssemblyDescription("This is the hello world for GrovePi, Raspberry Pi, and Windows IOT. Blink an LED!")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Dexter Industries, Inc")]
|
||||
[assembly: AssemblyProduct("HelloWorldBlinky")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyTrademark("GrovePi")]
|
||||
[assembly: AssemblyCulture("Counter")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
<!--
|
||||
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
|
||||
developers. However, you can modify these parameters to modify the behavior of the .NET Native
|
||||
optimizer.
|
||||
|
||||
Runtime Directives are documented at http://go.microsoft.com/fwlink/?LinkID=391919
|
||||
|
||||
To fully enable reflection for App1.MyClass and all of its public/private members
|
||||
<Type Name="App1.MyClass" Dynamic="Required All"/>
|
||||
|
||||
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
|
||||
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
|
||||
|
||||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Seralize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
An Assembly element with Name="*Application*" applies to all assemblies in
|
||||
the application package. The asterisks are not wildcards.
|
||||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
|
||||
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
|
||||
|
||||
</Application>
|
||||
</Directives>
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
// Hello World! Your first WinIOT project with the GrovePi!
|
||||
/*
|
||||
|
||||
This example simply turns and LED on and off at 1 second intervals.
|
||||
|
||||
The GrovePi connects the Raspberry Pi and Grove sensors.
|
||||
You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi
|
||||
|
||||
This example combines the GrovePi + LED:
|
||||
http://www.dexterindustries.com/shop/grovepi-board/
|
||||
http://www.dexterindustries.com/shop/grove-green-led/
|
||||
|
||||
Hardware Setup:
|
||||
Connect the LED to digital port 2
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
The MIT License(MIT)
|
||||
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
|
||||
Copyright (C) 2016 Dexter Industries
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Net.Http;
|
||||
using Windows.ApplicationModel.Background;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
// GrovePi Libraries Needed
|
||||
using GrovePi;
|
||||
using GrovePi.Sensors;
|
||||
using Windows.System.Threading;
|
||||
|
||||
namespace HelloWorldBlinky
|
||||
{
|
||||
public sealed class StartupTask : IBackgroundTask
|
||||
{
|
||||
// Create the LED.
|
||||
ILed led;
|
||||
public async void Run(IBackgroundTaskInstance taskInstance)
|
||||
{
|
||||
// Initiate the LED on Digital Pin 2. (D2).
|
||||
led = DeviceFactory.Build.Led(Pin.DigitalPin2);
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
||||
Task.Delay(1000).Wait(); //Delay 1 second
|
||||
try
|
||||
{
|
||||
// If the LED is on, turn it off. If the LED is off, turn it on.
|
||||
led.ChangeState((led.CurrentState == SensorStatus.Off) ? SensorStatus.On : SensorStatus.Off);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// Do Nothing if there's an exception.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0"
|
||||
},
|
||||
"frameworks": {
|
||||
"uap10.0": {}
|
||||
},
|
||||
"runtimes": {
|
||||
"win10-arm": {},
|
||||
"win10-arm-aot": {},
|
||||
"win10-x86": {},
|
||||
"win10-x86-aot": {},
|
||||
"win10-x64": {},
|
||||
"win10-x64-aot": {}
|
||||
}
|
||||
}
|
||||
89
Software/CSharp/Samples/HelloWorldBlinky/README.md
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
## **Hello World Blinky**
|
||||
Your first WinIOT project with the GrovePi! This example simply turns and LED on and off at 1 second intervals.
|
||||
|
||||
The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about [GrovePi here](http://www.dexterindustries.com/GrovePi).
|
||||
|
||||
This example combines the [GrovePi](http://www.dexterindustries.com/shop/grovepi-board/) and [Grove LED](http://www.dexterindustries.com/shop/grove-green-led/).
|
||||
|
||||
### Requirements
|
||||
You must have the following:
|
||||
|
||||
- [Windows 10](https://www.microsoft.com/windows/)
|
||||
- [Visual Studio 2015 Community Edition](https://www.visualstudio.com/) or better
|
||||
- [Raspberry Pi 2 running Windows 10 IoT Core](http://ms-iot.github.io/content/en-US/win10/RPI.htm)
|
||||
- [GrovePi+ Starter Kit for Raspberry Pi](http://www.dexterindustries.com/grovepi-starter-kit/)
|
||||
|
||||
### Install a Visual Studio 2015
|
||||
If you don't already have one installed, install Visual Studio 2015. You can use the free Community edition, or any other higher edition. When you are installing Visual Studio, you must do a __Custom__ install and select to install the __Universal Windows App Development Tools -> Tools and Windows SDK__.
|
||||
|
||||
After the installation is complete, install the Windows IoT Core Project Templates from [here](https://visualstudiogallery.msdn.microsoft.com/55b357e1-a533-43ad-82a5-a88ac4b01dec).
|
||||
|
||||
### Enable Developer Mode on your Windows 10 Development Device
|
||||
When you are developing on Windows 10, you choose what tasks you want to enable on the device. This includes any devices - Windows 10 desktops, tablets and phones. You can enable a device for development, or just app side loading. To enable _Developer mode_ on your Windows 10 device:
|
||||
|
||||
1. Click the Windows icon (typically in the lower-left of the screen, on the left-most side of the toolbar).
|
||||
2. Type __Update__ and select _Windows Update settings_ from the _Best match_ list. This will open the __UPDATE & SECURITY__ settings page.
|
||||
3. Click on __For developers__ in the left sidebar.
|
||||
4. Ensure the __Developer mode__ radio button is selected.
|
||||
5. Save your changes and close the _Settings_ window.
|
||||
|
||||
### Build the Samples
|
||||
Download the GrovePi repository to your development PC.
|
||||
|
||||
Each sample is its own solution. There are two ways to run the sample projects - within the GrovePi solution, or as individual solutions.
|
||||
|
||||
#### Samples as Part of GrovePi solution (recommended)
|
||||
When you run the samples as part of the GrovePi solution you know that you are using the very latest build of GrovePi, however; the samples are not part of the GrovePi solution by default - you must add them.
|
||||
|
||||
1. Open __GrovePi\Software\CSharp\GrovePi.sln__ in Visual Studio
|
||||
2. Right-click on the solution in the _Solution Explorer_
|
||||
3. Select __Add__ > __ New Solution Folder__
|
||||
4. Name the folder __Samples__
|
||||
5. Right-click on the solution in the _Solution Explorer_
|
||||
6. Select __Add__ > __ Existing Project__
|
||||
7. Find the __HelloWorldBlinky.csproj__ file - select it and click __Open__
|
||||
|
||||
This will add the _HelloWorldBlinky_ project to you new _Samples_ directory.
|
||||
|
||||
In the _HelloWorldBlinky_ project you need to update the reference to _GrovePi_.
|
||||
|
||||
1. In _Solution Explorer_ expand the _HelloWorldBlinky_ project and the _References_ node.
|
||||
2. Right-click on the __GrovePi__ reference and click __Remove_
|
||||
3. Right-click on the __References__ node and choose __Add Reference__
|
||||
4. Expand the __Projects__ node
|
||||
5. Select (by checking the check box) the __GrovePi__ project.
|
||||
6. Click __OK__
|
||||
|
||||
The project should now have all the updated references you need.
|
||||
|
||||
#### Samples as Independent Solutions
|
||||
When you run the sampels as independent solutions, you need to ensure you are referencing a current version of the GrovePi assembly (likely more current than the one available as a NuGet package).
|
||||
|
||||
The following steps assume you have already opened _GrovePi\Software\CSharp\GrovePi.sln_ in Visual Studio and built the solution. To build the solution, open GrovePi.sln, and click on press CTRL + SHIFT + B. Then close GrovePi.sln.
|
||||
|
||||
After building the GrovePi solution:
|
||||
|
||||
1. Open __GrovePi\Software\CSharp\Samples\LedFade.sln__ in Visual Studio.
|
||||
2. In _Solution Explorer_ expand the _HelloWorldBlinky_ project and the _References_ node.
|
||||
3. Right-click on the __GrovePi__ reference and click __Remove_.
|
||||
4. Right-click on "References" and click "Add Reference".
|
||||
5. Select the __Browse__ tab and click the __Browse__ button.
|
||||
6. Browse to __GrovePi\Software\CSharp\GrovePi\bin\ARM\Debug__ and select the __GrovePi.dll__ file
|
||||
7. Click __OK__
|
||||
|
||||
The project should now have all the updated references you need.
|
||||
|
||||
### Setup the Hardware
|
||||
For this sample, connect the following: Grove LED (any color) to __D2__ (Digital Pin 2)
|
||||
|
||||
### Run the Sample
|
||||
To run the sample...
|
||||
|
||||
1. Right-click on the _HelloWorldBlinky_ project in the _Solution Explorer_
|
||||
2. Select __Set as Startup Project__
|
||||
3. Right-click on the __Properties__ node under _HelloWorldBlinky_ and select __Open__
|
||||
4. Select the __Debug__ tab
|
||||
5. Select __Remote Machine__ in the _Target device_ field
|
||||
6. In the __Remote Machine__ field, Type in the name or IP Address of your Windows 10 IoT Core Raspberry Pi
|
||||
7. Press __Ctrl__ + __S__ (this file will not be saved automatically, you must save it manually).
|
||||
8. Press __F5__ to launch the debugger (it will take a minute or two to deploy your app onto the Raspberry Pi).
|
||||