diff --git a/Samples/WeatherStation/CPP/Assets/LockScreenLogo.scale-200.png b/Samples/WeatherStation/CPP/Assets/LockScreenLogo.scale-200.png deleted file mode 100644 index 735f57adb..000000000 Binary files a/Samples/WeatherStation/CPP/Assets/LockScreenLogo.scale-200.png and /dev/null differ diff --git a/Samples/WeatherStation/CPP/Assets/SplashScreen.scale-200.png b/Samples/WeatherStation/CPP/Assets/SplashScreen.scale-200.png deleted file mode 100644 index 023e7f1fe..000000000 Binary files a/Samples/WeatherStation/CPP/Assets/SplashScreen.scale-200.png and /dev/null differ diff --git a/Samples/WeatherStation/CPP/Assets/Square150x150Logo.scale-200.png b/Samples/WeatherStation/CPP/Assets/Square150x150Logo.scale-200.png deleted file mode 100644 index af49fec1a..000000000 Binary files a/Samples/WeatherStation/CPP/Assets/Square150x150Logo.scale-200.png and /dev/null differ diff --git a/Samples/WeatherStation/CPP/Assets/Square44x44Logo.scale-200.png b/Samples/WeatherStation/CPP/Assets/Square44x44Logo.scale-200.png deleted file mode 100644 index ce342a2ec..000000000 Binary files a/Samples/WeatherStation/CPP/Assets/Square44x44Logo.scale-200.png and /dev/null differ diff --git a/Samples/WeatherStation/CPP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/Samples/WeatherStation/CPP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png deleted file mode 100644 index f6c02ce97..000000000 Binary files a/Samples/WeatherStation/CPP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ diff --git a/Samples/WeatherStation/CPP/Assets/StoreLogo.png b/Samples/WeatherStation/CPP/Assets/StoreLogo.png deleted file mode 100644 index 7385b56c0..000000000 Binary files a/Samples/WeatherStation/CPP/Assets/StoreLogo.png and /dev/null differ diff --git a/Samples/WeatherStation/CPP/Assets/Wide310x150Logo.scale-200.png b/Samples/WeatherStation/CPP/Assets/Wide310x150Logo.scale-200.png deleted file mode 100644 index 288995b39..000000000 Binary files a/Samples/WeatherStation/CPP/Assets/Wide310x150Logo.scale-200.png and /dev/null differ diff --git a/Samples/WeatherStation/CPP/Package.appxmanifest b/Samples/WeatherStation/CPP/Package.appxmanifest deleted file mode 100644 index 7d56e1cca..000000000 --- a/Samples/WeatherStation/CPP/Package.appxmanifest +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - WeatherStation - MSFT - Assets\StoreLogo.png - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Samples/WeatherStation/CPP/README.md b/Samples/WeatherStation/CPP/README.md deleted file mode 100644 index d05b46afc..000000000 --- a/Samples/WeatherStation/CPP/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Weather Station - -Communicate with an I2C/SPI based temperature and pressure sensor - -Upon executing this sample, you'll have learned how to measure temperature and pressure using I2C/SPI! - -[Each pin on this map](https://adafruitsample.azurewebsites.net/cardViewer?lesson=203) is another maker that has run this sample. Zoom around to see where they are and deploy the sample to put your pin on the map! - -![weather-station](../../../Resources/images/AdafruitStarterPack/WeatherStation.jpg) - -### Click [here](https://www.hackster.io/windows-iot/weather-station) to get started! - -### If you have v2 of the kit with a BME280 Click [here](https://www.hackster.io/windows-iot/weather-station-v-2-0-8abe16?auth_token=80b912d8d81919969ccab0080ddd8e2f) to get started! diff --git a/Samples/WeatherStation/CPP/StartupTask.cpp b/Samples/WeatherStation/CPP/StartupTask.cpp deleted file mode 100644 index 5eabf646d..000000000 --- a/Samples/WeatherStation/CPP/StartupTask.cpp +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft. All rights reserved. - -#include "pch.h" -#include "StartupTask.h" - -using namespace WeatherStation; - -using namespace Platform; -using namespace Windows::ApplicationModel::Background; -using namespace Windows::Foundation; -using namespace Windows::Devices::I2c; -using namespace Windows::Devices::Enumeration; -using namespace Windows::System::Threading; -using namespace concurrency; - -StartupTask::StartupTask() -{ -} - -void StartupTask::Run(IBackgroundTaskInstance^ taskInstance) -{ - Deferral = taskInstance->GetDeferral(); - - auto controllerTask = create_task(I2cController::GetDefaultAsync()); - controllerTask.then([this](I2cController^ controller) { - Device = controller->GetDevice(ref new I2cConnectionSettings(0x40)); - }); - - - - TimerElapsedHandler ^handler = ref new TimerElapsedHandler( - [this](ThreadPoolTimer ^timer) - { - wchar_t humidityOutput[100]; - wchar_t temperatureOutput[100]; - - double humidity = GetHumidity(); - swprintf_s(humidityOutput, 100, L"Humidity: %f\n", humidity); - OutputDebugStringW(humidityOutput); - - - double temperature = GetTemperature(); - swprintf_s(temperatureOutput, 100, L"Temperature: %f\n", temperature); - OutputDebugStringW(temperatureOutput); - - - - - }); - - TimeSpan interval; - interval.Duration = 1000 * 1000 * 10; - Timer = ThreadPoolTimer::CreatePeriodicTimer(handler, interval); -} - -double StartupTask::GetTemperature() -{ - Platform::Array^ command = ref new Platform::Array(1); - command[0] = 0xE3; - Array^ data = ref new Array(2); - Device->WriteRead(command, data); - auto rawReading = data[0] << 8 | data[1]; - auto ratio = rawReading / (float)65536; - double temperature = (-46.85 + (175.72 * ratio)) * 9 / 5 + 32; - return temperature; -} - -double StartupTask::GetHumidity() -{ - Platform::Array^ command = ref new Platform::Array(1); - command[0] = 0xE5; - Array^ data = ref new Array(2); - Device->WriteRead(command, data); - auto rawReading = data[0] << 8 | data[1]; - auto ratio = rawReading / (float)65536; - double humidity = -6 + (125 * ratio); - return humidity; -} \ No newline at end of file diff --git a/Samples/WeatherStation/CPP/StartupTask.h b/Samples/WeatherStation/CPP/StartupTask.h deleted file mode 100644 index 455f47e9d..000000000 --- a/Samples/WeatherStation/CPP/StartupTask.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright(c) Microsoft Open Technologies, Inc. All rights reserved. - -The MIT License(MIT) - -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. -*/ -#pragma once - -#include "pch.h" - -namespace WeatherStation -{ - [Windows::Foundation::Metadata::WebHostHidden] - public ref class StartupTask sealed : public Windows::ApplicationModel::Background::IBackgroundTask - { - public: - StartupTask(); - virtual void Run(Windows::ApplicationModel::Background::IBackgroundTaskInstance^ taskInstance); - - private: - double GetTemperature(); - double GetHumidity(); - private: - Platform::Agile Deferral; - Windows::ApplicationModel::Background::IBackgroundTaskInstance^ TaskInstance; - Windows::System::Threading::ThreadPoolTimer ^Timer; - Windows::Devices::I2c::I2cDevice ^ Device; - }; -} diff --git a/Samples/WeatherStation/CPP/WeatherStation.sln b/Samples/WeatherStation/CPP/WeatherStation.sln deleted file mode 100644 index db385d590..000000000 --- a/Samples/WeatherStation/CPP/WeatherStation.sln +++ /dev/null @@ -1,40 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.22823.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WeatherStation", "WeatherStation.vcxproj", "{49983D47-95FF-4239-8357-50AFACD32BF8}" -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 - {49983D47-95FF-4239-8357-50AFACD32BF8}.Debug|ARM.ActiveCfg = Debug|ARM - {49983D47-95FF-4239-8357-50AFACD32BF8}.Debug|ARM.Build.0 = Debug|ARM - {49983D47-95FF-4239-8357-50AFACD32BF8}.Debug|ARM.Deploy.0 = Debug|ARM - {49983D47-95FF-4239-8357-50AFACD32BF8}.Debug|x64.ActiveCfg = Debug|x64 - {49983D47-95FF-4239-8357-50AFACD32BF8}.Debug|x64.Build.0 = Debug|x64 - {49983D47-95FF-4239-8357-50AFACD32BF8}.Debug|x64.Deploy.0 = Debug|x64 - {49983D47-95FF-4239-8357-50AFACD32BF8}.Debug|x86.ActiveCfg = Debug|Win32 - {49983D47-95FF-4239-8357-50AFACD32BF8}.Debug|x86.Build.0 = Debug|Win32 - {49983D47-95FF-4239-8357-50AFACD32BF8}.Debug|x86.Deploy.0 = Debug|Win32 - {49983D47-95FF-4239-8357-50AFACD32BF8}.Release|ARM.ActiveCfg = Release|ARM - {49983D47-95FF-4239-8357-50AFACD32BF8}.Release|ARM.Build.0 = Release|ARM - {49983D47-95FF-4239-8357-50AFACD32BF8}.Release|ARM.Deploy.0 = Release|ARM - {49983D47-95FF-4239-8357-50AFACD32BF8}.Release|x64.ActiveCfg = Release|x64 - {49983D47-95FF-4239-8357-50AFACD32BF8}.Release|x64.Build.0 = Release|x64 - {49983D47-95FF-4239-8357-50AFACD32BF8}.Release|x64.Deploy.0 = Release|x64 - {49983D47-95FF-4239-8357-50AFACD32BF8}.Release|x86.ActiveCfg = Release|Win32 - {49983D47-95FF-4239-8357-50AFACD32BF8}.Release|x86.Build.0 = Release|Win32 - {49983D47-95FF-4239-8357-50AFACD32BF8}.Release|x86.Deploy.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Samples/WeatherStation/CPP/WeatherStation.vcxproj b/Samples/WeatherStation/CPP/WeatherStation.vcxproj deleted file mode 100644 index 5e09548da..000000000 --- a/Samples/WeatherStation/CPP/WeatherStation.vcxproj +++ /dev/null @@ -1,252 +0,0 @@ - - - - - Debug - ARM - - - Debug - Win32 - - - Debug - x64 - - - Release - ARM - - - Release - Win32 - - - Release - x64 - - - - {49983d47-95ff-4239-8357-50afacd32bf8} - Win32Proj - WeatherStation - en-US - 14.0 - true - Windows Store - 10.0.17763.0 - 10.0.10240.0 - 10.0 - true - true - true - WeatherStation_TemporaryKey.pfx - true - - - - DynamicLibrary - true - v141 - - - DynamicLibrary - true - v141 - - - DynamicLibrary - true - v141 - - - DynamicLibrary - false - true - v141 - true - - - DynamicLibrary - false - true - v141 - true - - - DynamicLibrary - false - true - v141 - true - - - - - - - - - - - - - - - - - - - - - - - - - false - - - false - - - false - - - false - - - false - - - false - - - - Use - _WINRT_DLL;%(PreprocessorDefinitions) - pch.h - $(IntDir)pch.pch - $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj %(AdditionalOptions) - 28204 - - - Console - runtimeobject.lib;%(AdditionalDependencies) - - - - - Use - _WINRT_DLL;NDEBUG;%(PreprocessorDefinitions) - pch.h - $(IntDir)pch.pch - $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj %(AdditionalOptions) - 28204 - - - Console - runtimeobject.lib;%(AdditionalDependencies) - false - false - - - - - Use - _WINRT_DLL;%(PreprocessorDefinitions) - pch.h - $(IntDir)pch.pch - $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj %(AdditionalOptions) - 28204 - - - Console - runtimeobject.lib;%(AdditionalDependencies) - false - - - - - Use - _WINRT_DLL;NDEBUG;%(PreprocessorDefinitions) - pch.h - $(IntDir)pch.pch - $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj %(AdditionalOptions) - 28204 - - - Console - runtimeobject.lib;%(AdditionalDependencies) - false - - - - - Use - _WINRT_DLL;%(PreprocessorDefinitions) - pch.h - $(IntDir)pch.pch - $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj %(AdditionalOptions) - 28204 - - - Console - runtimeobject.lib;%(AdditionalDependencies) - false - - - - - Use - _WINRT_DLL;NDEBUG;%(PreprocessorDefinitions) - pch.h - $(IntDir)pch.pch - $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj %(AdditionalOptions) - 28204 - - - Console - runtimeobject.lib;%(AdditionalDependencies) - false - - - - - Designer - - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - Create - Create - - - - - - - \ No newline at end of file diff --git a/Samples/WeatherStation/CPP/WeatherStation.vcxproj.filters b/Samples/WeatherStation/CPP/WeatherStation.vcxproj.filters deleted file mode 100644 index 75cb7c4cd..000000000 --- a/Samples/WeatherStation/CPP/WeatherStation.vcxproj.filters +++ /dev/null @@ -1,41 +0,0 @@ - - - - - 49983d47-95ff-4239-8357-50afacd32bf8 - - - f1521347-aba0-415a-87a0-c2e6c08c753d - bmp;fbx;gif;jpg;jpeg;tga;tiff;tif;png - - - Assets - - - Assets - - - Assets - - - Assets - - - Assets - - - - - - - - - - - - - - - - - diff --git a/Samples/WeatherStation/CPP/WeatherStation_TemporaryKey.pfx b/Samples/WeatherStation/CPP/WeatherStation_TemporaryKey.pfx deleted file mode 100644 index e780d33a6..000000000 Binary files a/Samples/WeatherStation/CPP/WeatherStation_TemporaryKey.pfx and /dev/null differ diff --git a/Samples/WeatherStation/CPP/pch.cpp b/Samples/WeatherStation/CPP/pch.cpp deleted file mode 100644 index 247ca3037..000000000 --- a/Samples/WeatherStation/CPP/pch.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright (c) Microsoft. All rights reserved. - -// -// pch.cpp -// Include the standard header and generate the precompiled header. -// - -#include "pch.h" diff --git a/Samples/WeatherStation/CPP/pch.h b/Samples/WeatherStation/CPP/pch.h deleted file mode 100644 index 69443ba78..000000000 --- a/Samples/WeatherStation/CPP/pch.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright(c) Microsoft Open Technologies, Inc. All rights reserved. - -The MIT License(MIT) - -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. -*/ - -// -// pch.h -// Header for standard system include files. -// - -#pragma once - -#include -#include -#include diff --git a/Samples/WeatherStation/VB/Assets/LockScreenLogo.scale-200.png b/Samples/WeatherStation/VB/Assets/LockScreenLogo.scale-200.png deleted file mode 100644 index 735f57adb..000000000 Binary files a/Samples/WeatherStation/VB/Assets/LockScreenLogo.scale-200.png and /dev/null differ diff --git a/Samples/WeatherStation/VB/Assets/SplashScreen.scale-200.png b/Samples/WeatherStation/VB/Assets/SplashScreen.scale-200.png deleted file mode 100644 index 023e7f1fe..000000000 Binary files a/Samples/WeatherStation/VB/Assets/SplashScreen.scale-200.png and /dev/null differ diff --git a/Samples/WeatherStation/VB/Assets/Square150x150Logo.scale-200.png b/Samples/WeatherStation/VB/Assets/Square150x150Logo.scale-200.png deleted file mode 100644 index af49fec1a..000000000 Binary files a/Samples/WeatherStation/VB/Assets/Square150x150Logo.scale-200.png and /dev/null differ diff --git a/Samples/WeatherStation/VB/Assets/Square44x44Logo.scale-200.png b/Samples/WeatherStation/VB/Assets/Square44x44Logo.scale-200.png deleted file mode 100644 index ce342a2ec..000000000 Binary files a/Samples/WeatherStation/VB/Assets/Square44x44Logo.scale-200.png and /dev/null differ diff --git a/Samples/WeatherStation/VB/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/Samples/WeatherStation/VB/Assets/Square44x44Logo.targetsize-24_altform-unplated.png deleted file mode 100644 index f6c02ce97..000000000 Binary files a/Samples/WeatherStation/VB/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ diff --git a/Samples/WeatherStation/VB/Assets/StoreLogo.png b/Samples/WeatherStation/VB/Assets/StoreLogo.png deleted file mode 100644 index 7385b56c0..000000000 Binary files a/Samples/WeatherStation/VB/Assets/StoreLogo.png and /dev/null differ diff --git a/Samples/WeatherStation/VB/Assets/Wide310x150Logo.scale-200.png b/Samples/WeatherStation/VB/Assets/Wide310x150Logo.scale-200.png deleted file mode 100644 index 288995b39..000000000 Binary files a/Samples/WeatherStation/VB/Assets/Wide310x150Logo.scale-200.png and /dev/null differ diff --git a/Samples/WeatherStation/VB/My Project/AssemblyInfo.vb b/Samples/WeatherStation/VB/My Project/AssemblyInfo.vb deleted file mode 100644 index c0e42bc8b..000000000 --- a/Samples/WeatherStation/VB/My Project/AssemblyInfo.vb +++ /dev/null @@ -1,31 +0,0 @@ -Imports System -Imports System.Reflection -Imports 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. - -' Review the values of the assembly attributes - - - - - - - - -' 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: -' - - - - \ No newline at end of file diff --git a/Samples/WeatherStation/VB/My Project/Default.rd.xml b/Samples/WeatherStation/VB/My Project/Default.rd.xml deleted file mode 100644 index 80a960ce3..000000000 --- a/Samples/WeatherStation/VB/My Project/Default.rd.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/Samples/WeatherStation/VB/Package.appxmanifest b/Samples/WeatherStation/VB/Package.appxmanifest deleted file mode 100644 index 03bb5fc50..000000000 --- a/Samples/WeatherStation/VB/Package.appxmanifest +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - WeatherStationVB - MSFT - Assets\StoreLogo.png - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Samples/WeatherStation/VB/README.md b/Samples/WeatherStation/VB/README.md deleted file mode 100644 index d05b46afc..000000000 --- a/Samples/WeatherStation/VB/README.md +++ /dev/null @@ -1,13 +0,0 @@ -# Weather Station - -Communicate with an I2C/SPI based temperature and pressure sensor - -Upon executing this sample, you'll have learned how to measure temperature and pressure using I2C/SPI! - -[Each pin on this map](https://adafruitsample.azurewebsites.net/cardViewer?lesson=203) is another maker that has run this sample. Zoom around to see where they are and deploy the sample to put your pin on the map! - -![weather-station](../../../Resources/images/AdafruitStarterPack/WeatherStation.jpg) - -### Click [here](https://www.hackster.io/windows-iot/weather-station) to get started! - -### If you have v2 of the kit with a BME280 Click [here](https://www.hackster.io/windows-iot/weather-station-v-2-0-8abe16?auth_token=80b912d8d81919969ccab0080ddd8e2f) to get started! diff --git a/Samples/WeatherStation/VB/StartupTask.vb b/Samples/WeatherStation/VB/StartupTask.vb deleted file mode 100644 index b7684f71c..000000000 --- a/Samples/WeatherStation/VB/StartupTask.vb +++ /dev/null @@ -1,52 +0,0 @@ -' Copyright (c) Microsoft. All rights reserved. - -Imports System -Imports System.Collections.Generic -Imports System.Linq -Imports System.Text -Imports System.Net.Http -Imports Windows.ApplicationModel.Background -Imports Windows.Devices.Enumeration -Imports Windows.Devices.I2C -Imports Windows.System.Threading -' The Background Application template is documented at http://go.microsoft.com/fwlink/?LinkID=533884&clcid=0x409 - -Public NotInheritable Class StartupTask - Implements IBackgroundTask - Dim deferral As BackgroundTaskDeferral - Dim sensor As I2cDevice - Dim timer As ThreadPoolTimer - Public Async Sub Run(taskInstance As IBackgroundTaskInstance) Implements IBackgroundTask.Run - deferral = taskInstance.GetDeferral() - Dim controller As I2cController - controller = Await I2cController.GetDefaultAsync() - sensor = controller.GetDevice(New I2cConnectionSettings(&H40)) - timer = ThreadPoolTimer.CreatePeriodicTimer(AddressOf Timer_Tick, TimeSpan.FromSeconds(2)) - - End Sub - - Public Sub Timer_Tick(timer As ThreadPoolTimer) - Dim tempCommand(0 To 0) As Byte - tempCommand(0) = &HE3 - Dim tempData(0 To 1) As Byte - sensor.WriteRead(tempCommand, tempData) - Dim byte0 As Int32 = tempData(0) - Dim byte1 As Int32 = tempData(1) - Dim rawReading As Short = byte0 << 8 Or byte1 - Dim tempRatio As Double = rawReading / 65536.0 - Dim temperature As Double = (-46.85 + (175.72 * tempRatio)) * 9.0 / 5.0 + 32 - System.Diagnostics.Debug.WriteLine("Temp: " + temperature.ToString()) - - Dim humidityCommand(0 To 0) As Byte - humidityCommand(0) = &HE5 - Dim humidityData(0 To 1) As Byte - sensor.WriteRead(humidityCommand, humidityData) - byte0 = humidityData(0) - byte1 = humidityData(1) - rawReading = byte0 << 8 Or byte1 - Dim humidityRatio As Double = rawReading / 65536.0 - Dim humidity As Double = -6 + (125 * humidityRatio) - System.Diagnostics.Debug.WriteLine("Humidity: " + humidity.ToString()) - - End Sub -End Class diff --git a/Samples/WeatherStation/VB/WeatherStationVB.sln b/Samples/WeatherStation/VB/WeatherStationVB.sln deleted file mode 100644 index 01fbe333e..000000000 --- a/Samples/WeatherStation/VB/WeatherStationVB.sln +++ /dev/null @@ -1,40 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WeatherStationVB", "WeatherStationVB.vbproj", "{3C6D3DC9-7F38-4F5E-9627-4883584BC086}" -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 - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Debug|ARM.ActiveCfg = Debug|ARM - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Debug|ARM.Build.0 = Debug|ARM - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Debug|ARM.Deploy.0 = Debug|ARM - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Debug|x64.ActiveCfg = Debug|x64 - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Debug|x64.Build.0 = Debug|x64 - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Debug|x64.Deploy.0 = Debug|x64 - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Debug|x86.ActiveCfg = Debug|x86 - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Debug|x86.Build.0 = Debug|x86 - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Debug|x86.Deploy.0 = Debug|x86 - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Release|ARM.ActiveCfg = Release|ARM - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Release|ARM.Build.0 = Release|ARM - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Release|ARM.Deploy.0 = Release|ARM - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Release|x64.ActiveCfg = Release|x64 - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Release|x64.Build.0 = Release|x64 - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Release|x64.Deploy.0 = Release|x64 - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Release|x86.ActiveCfg = Release|x86 - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Release|x86.Build.0 = Release|x86 - {3C6D3DC9-7F38-4F5E-9627-4883584BC086}.Release|x86.Deploy.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/Samples/WeatherStation/VB/WeatherStationVB.vbproj b/Samples/WeatherStation/VB/WeatherStationVB.vbproj deleted file mode 100644 index eccd54cbe..000000000 --- a/Samples/WeatherStation/VB/WeatherStationVB.vbproj +++ /dev/null @@ -1,181 +0,0 @@ - - - - - Debug - x86 - {3C6D3DC9-7F38-4F5E-9627-4883584BC086} - winmdobj - WeatherStationVB - WeatherStationVB - en-US - UAP - 10.0.17763.0 - 10.0.10240.0 - 14 - true - 512 - {A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{F184B08F-C81C-45F6-A57F-5ABD9991F28F} - false - WeatherStationVB_TemporaryKey.pfx - true - true - win10-arm;win10-arm-aot;win10-x86;win10-x86-aot;win10-x64;win10-x64-aot - - - true - true - true - bin\ARM\Debug\ - NETFX_CORE,WINDOWS_UWP - full - ARM - false - true - WeatherStationVB.xml - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - - - true - bin\ARM\Release\ - NETFX_CORE,WINDOWS_UWP - true - pdbonly - ARM - false - true - WeatherStationVB.xml - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - true - - - true - true - true - bin\x64\Debug\ - NETFX_CORE,WINDOWS_UWP - full - x64 - false - true - WeatherStationVB.xml - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - - - true - bin\x64\Release\ - NETFX_CORE,WINDOWS_UWP - true - pdbonly - x64 - false - true - WeatherStationVB.xml - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - true - - - true - true - true - bin\x86\Debug\ - NETFX_CORE,WINDOWS_UWP - full - x86 - false - true - WeatherStationVB.xml - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - - - true - bin\x86\Release\ - NETFX_CORE,WINDOWS_UWP - true - pdbonly - x86 - false - true - WeatherStationVB.xml - 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036,42314 - true - - - - - - - - Designer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5.0.0 - - - - 14.0 - - - On - - - Binary - - - Off - - - On - - - - \ No newline at end of file diff --git a/Samples/WeatherStation/VB/WeatherStationVB_TemporaryKey.pfx b/Samples/WeatherStation/VB/WeatherStationVB_TemporaryKey.pfx deleted file mode 100644 index e780d33a6..000000000 Binary files a/Samples/WeatherStation/VB/WeatherStationVB_TemporaryKey.pfx and /dev/null differ