first commit

This commit is contained in:
pandacraft 2025-03-21 16:04:17 +01:00
commit a5a0434432
1126 changed files with 439481 additions and 0 deletions

View file

@ -0,0 +1,40 @@

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}") = "LcdRgbDisplay", "LcdRgbDisplay\LcdRgbDisplay.csproj", "{12DF6824-E562-4123-9D57-EEBDBE36A7E4}"
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
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Debug|ARM.ActiveCfg = Debug|ARM
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Debug|ARM.Build.0 = Debug|ARM
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Debug|ARM.Deploy.0 = Debug|ARM
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Debug|x64.ActiveCfg = Debug|x64
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Debug|x64.Build.0 = Debug|x64
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Debug|x64.Deploy.0 = Debug|x64
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Debug|x86.ActiveCfg = Debug|x86
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Debug|x86.Build.0 = Debug|x86
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Debug|x86.Deploy.0 = Debug|x86
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Release|ARM.ActiveCfg = Release|ARM
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Release|ARM.Build.0 = Release|ARM
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Release|ARM.Deploy.0 = Release|ARM
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Release|x64.ActiveCfg = Release|x64
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Release|x64.Build.0 = Release|x64
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Release|x64.Deploy.0 = Release|x64
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Release|x86.ActiveCfg = Release|x86
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Release|x86.Build.0 = Release|x86
{12DF6824-E562-4123-9D57-EEBDBE36A7E4}.Release|x86.Deploy.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -0,0 +1,148 @@
<?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>{12DF6824-E562-4123-9D57-EEBDBE36A7E4}</ProjectGuid>
<OutputType>winmdobj</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LcdRgbDisplay</RootNamespace>
<AssemblyName>LcdRgbDisplay</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.10240.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>LcdRgbDisplay_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="LcdRgbDisplay_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">
<HintPath>..\..\..\GrovePi\bin\ARM\Debug\GrovePi.dll</HintPath>
</Reference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</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>

View file

@ -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="LcdRgbDisplay-uwp"
Publisher="CN=dseven"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="d9e6f029-1fc6-4cf2-b297-3dc598156121" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
<Properties>
<DisplayName>LcdRgbDisplay</DisplayName>
<PublisherDisplayName>dseven</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="LcdRgbDisplay"
Square150x150Logo="Assets\Square150x150Logo.png"
Square44x44Logo="Assets\Square44x44Logo.png"
Description="LcdRgbDisplay"
BackgroundColor="transparent"
AppListEntry="none">
<uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png"/>
<uap:SplashScreen Image="Assets\SplashScreen.png" />
</uap:VisualElements>
<Extensions>
<Extension Category="windows.backgroundTasks" EntryPoint="LcdRgbDisplay.StartupTask">
<BackgroundTasks>
<iot:Task Type="startup" />
</BackgroundTasks>
</Extension>
</Extensions>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>

View file

@ -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("LcdRgbDisplay")]
[assembly: AssemblyDescription("Demonstration using the LCD RGB Display")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Doug Seven")]
[assembly: AssemblyProduct("LcdRgbDisplay")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 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)]

View file

@ -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>

View file

@ -0,0 +1,105 @@
// Display text and change background color on the LCD RGB Backlight Display
// GrovePi + LCD RGB Backlight Display
// http://www.seeedstudio.com/wiki/Grove_-_LCD_RGB_Backlight
/*
The MIT License(MIT)
GrovePi for the Raspberry Pi: an open source platform for connecting Grove Sensors to the Raspberry Pi.
Copyright (C) 2017 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.Text;
using Windows.ApplicationModel.Background;
using Windows.System.Threading;
using GrovePi;
using GrovePi.I2CDevices;
namespace LcdRgbDisplay
{
public sealed class StartupTask : IBackgroundTask
{
ThreadPoolTimer timer;
BackgroundTaskDeferral deferral;
IRgbLcdDisplay display;
DateTime now;
string ampm;
public void Run(IBackgroundTaskInstance taskInstance)
{
deferral = taskInstance.GetDeferral();
// Connect the RGB display to one of the I2C ports
display = DeviceFactory.Build.RgbLcdDisplay();
// Create a timer that will 'tick' every half-second (500ms)
timer = ThreadPoolTimer.CreatePeriodicTimer(this.Timer_Tick, TimeSpan.FromSeconds(1));
}
private void Timer_Tick(ThreadPoolTimer timer)
{
try
{
// Get the current time
now = DateTime.Now;
// Use a StringBuilder to assemble the display text
StringBuilder timeString = new StringBuilder();
if (now.Hour > 12)
{
// Set the RGB backlight to a light blue-ish color
display.SetBacklightRgb(0, 255, 255);
timeString.Append("Good evening.\n");
ampm = " PM";
timeString.Append(now.Hour - 12);
}
else
{
// Set the RGB backlight to a light yellow-ish color
display.SetBacklightRgb(255, 255, 0);
timeString.Append("Good morning.\n");
ampm = " AM";
timeString.Append(now.Hour);
}
timeString.Append(":");
timeString.Append(now.Minute.ToString("D2"));
timeString.Append(":");
timeString.Append(now.Second.ToString("D2"));
timeString.Append(ampm);
// Display the time
display.SetText(timeString.ToString());
}
catch (Exception ex)
{
}
}
}
}

View file

@ -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": {}
}
}

File diff suppressed because it is too large Load diff