diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index b86e231..6343f5f 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -3,6 +3,7 @@ name: Main Build on: workflow_dispatch: pull_request: + branches: [ main ] push: branches: [ main ] @@ -17,7 +18,6 @@ jobs: uses: actions/checkout@v3 with: path: Clima - ref: main - name: Setup .NET uses: actions/setup-dotnet@v2 diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..4587e7a --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,10 @@ +{ + "configurations": [ + { + "name": "COM9", + "type": "meadow", + "request": "launch", + "preLaunchTask": "meadow: Build" + } + ] +} \ No newline at end of file diff --git a/Image_Assets/Clima.jpg b/Image_Assets/Clima.jpg deleted file mode 100644 index 63ad745..0000000 Binary files a/Image_Assets/Clima.jpg and /dev/null differ diff --git a/Image_Assets/Clima_Fritzing_Diagram.png b/Image_Assets/Clima_Fritzing_Diagram.png deleted file mode 100644 index 5d9ae03..0000000 Binary files a/Image_Assets/Clima_Fritzing_Diagram.png and /dev/null differ diff --git a/Image_Assets/Clima_android.png b/Image_Assets/Clima_android.png deleted file mode 100644 index 5c97ed5..0000000 Binary files a/Image_Assets/Clima_android.png and /dev/null differ diff --git a/Image_Assets/clima-banner.jpg b/Image_Assets/clima-banner.jpg index 9dd6dd8..c794530 100644 Binary files a/Image_Assets/clima-banner.jpg and b/Image_Assets/clima-banner.jpg differ diff --git a/README.md b/README.md index 37d5570..e737485 100644 --- a/README.md +++ b/README.md @@ -3,46 +3,17 @@ Clima is a solar-powered, custom embedded-IoT solution that tracks climate from a suite of sensors, saves data locally for access via Bluetooth, uses a RESTful Web API, and synchronizes data to the cloud. ## Contents -* [Clima Versions](#clima-versions) +* [Clima Pro](#clima) * [Assembly Instructions](#assembly-instructions) * [Getting Started](#getting-started) * [Hardware Specifications](#hardware-specifications) -* [Mobile Companion App](#mobile-companion-app) -* [Get an API Key for OpenWeather](#get-an-api-key-for-openweather) -* [Clima.HackKit](#climahackkit) * [Support](#support) -## Clima Versions - -We offer clima in two options, a full dedicated kit that it's fully solar powered build and ideal to measure weather outdoors, or a much simplified version that you can build with our Hack Kits. - -Both versions are 100% open source, including all of the enclosure design files, and PCB design of the pro version. - - - - - - - - - - - - - - -
- Clima.Pro Version - - Clima.HackKit Version
- - - -
- With this kit, it includes the complete package of sensors, PCB enclosure and mount to place this outdoors. You'll be able to measure wind speed/direction, rain volume, atmospheric conditions like temperature, pressure, humidity, CO2 levels and GPS Coordinates. - - With the Meadow Hack Kit, you can build this project to measure indoor room temperature with an analog temperature sensor, use a 240x240 TFT Spi display and three push buttons to build a simple UI using MicroGraphics to do things like change temperature units, and more. -
+## Clima + +With this kit, it includes the complete package of sensors, PCB enclosure and mount to place this outdoors. You'll be able to measure wind speed/direction, rain volume, atmospheric conditions like temperature, pressure, humidity, CO2 levels and GPS Coordinates. + + ## Assembly Instructions @@ -60,37 +31,28 @@ To simplify the way to use this Meadow-powered reference IoT product, we've crea - `dotnet add package Meadow.Clima`, or - [Meadow.Clima Nuget Package](https://www.nuget.org/packages/Meadow.Clima/) -2. Instantiate the `IClimaHardware` object: +2. Change the App type on your MeadowApp class to `ClimaAppBase` and initialize Clima's `MainController` passing the `Hardware` and a `INetworkAdapter` such as your WiFi adapter onboard the Meadow Core Compute Module: + ```csharp -public class MeadowApp : App +public class ClimaApp : ClimaAppBase { - IClimaHardware clima; - public override Task Initialize() { - clima = Clima.Create(); - ... -``` + Resolver.Log.Info($"Initialize..."); -3. To Access the `Clima` onboard peripherals (AtmosphericSensor, for example): -```csharp - if (clima.AtmosphericSensor is { } bme688) - { - bme688.Updated += Bme688Updated; - bme688.StartUpdating(); - } -``` + var mainController = new MainController(); + + var wifi = Hardware.ComputeModule.NetworkAdapters.Primary(); -4. Like on step 3, you can also access the rest of peripherals: - - `EnvironmentalSensor` - Access the SCD40 sensor - - `WindVane` - Access the Wind Vane to check wind direction - - `RainGauge` - Access the Rain Gauge to check rain volume - - `Anemometer` - Access the Anemometer to get wind speed - - `SolarVoltageInput` - Access the voltage input from the Solar Add-on - - `Gnss` - Access the NEO-M8 GNSS/GPS module - - `ColorLed` - Access an RGB LED + mainController.Initialize( + hardware: Hardware, + networkAdapter: wifi); + . + . + . +``` -5. Run the [Clima_Demo](Source/Clima_Demo/) project that uses all the peripherals onboard and outputs readings every few seconds. +3. Run the [Clima_Demo](Source/Clima_Demo/) project that does periodic readings of all its sensors and sends them to [Meadow.Cloud](https://www.meadowcloud.co) if you have a Wilderness Labs account and have provisioned your device. ## Hardware Specifications @@ -98,22 +60,6 @@ public class MeadowApp : App You can find the schematics and other design files in the [Hardware_Design folder](Hardware_Design/). -## Mobile Companion App - -This project also comes with a Xamarin.Forms Clima companion app (on Android and iOS) that shows you how to communicate with your Meadow device using [Bluetooth](http://developer.wildernesslabs.co/Meadow/Meadow.OS/Bluetooth/) and [Maple](http://developer.wildernesslabs.co/Meadow/Meadow.Foundation/Libraries_and_Frameworks/Maple.Server/) for both kit versions. - -![Clima companion app](Image_Assets/Clima_android.png) - -## Get an API Key for OpenWeather - -Go to [Register for an OpenWeather API Key](https://blog.wildernesslabs.co/add-openweather-to-your-meadow-projects/) - -## Clima.HackKit - -![Clima hack kit](Image_Assets/Clima.jpg) - -Instructions on how to assemble the Clima Hack Kit Version can be found [here](/Docs/Clima.HackKit/readme.md) - ## Support Having trouble building/running these projects? diff --git a/Source/Additional Samples/Clima_Companion_App/App.xaml b/Source/Additional Samples/Clima_Companion_App/App.xaml deleted file mode 100644 index 7af90e1..0000000 --- a/Source/Additional Samples/Clima_Companion_App/App.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - diff --git a/Source/Additional Samples/Clima_Companion_App/App.xaml.cs b/Source/Additional Samples/Clima_Companion_App/App.xaml.cs deleted file mode 100644 index 87bed9d..0000000 --- a/Source/Additional Samples/Clima_Companion_App/App.xaml.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace MobileClima -{ - public partial class App : Application - { - public App() - { - InitializeComponent(); - - MainPage = new AppShell(); - } - } -} \ No newline at end of file diff --git a/Source/Additional Samples/Clima_Companion_App/AppShell.xaml b/Source/Additional Samples/Clima_Companion_App/AppShell.xaml deleted file mode 100644 index a6810a5..0000000 --- a/Source/Additional Samples/Clima_Companion_App/AppShell.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/Source/Additional Samples/Clima_Companion_App/AppShell.xaml.cs b/Source/Additional Samples/Clima_Companion_App/AppShell.xaml.cs deleted file mode 100644 index e4c6ebb..0000000 --- a/Source/Additional Samples/Clima_Companion_App/AppShell.xaml.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace MobileClima; - -public partial class AppShell : Shell -{ - public AppShell() - { - InitializeComponent(); - } -} diff --git a/Source/Additional Samples/Clima_Companion_App/Clima_Companion_App.csproj b/Source/Additional Samples/Clima_Companion_App/Clima_Companion_App.csproj deleted file mode 100644 index c1c36df..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Clima_Companion_App.csproj +++ /dev/null @@ -1,60 +0,0 @@ - - - net7.0-android - - - Exe - MobileClima - true - true - enable - - - Clima - - - com.companyname.MobileClima - 2750A062-72A3-4E67-A82F-AAC0A348C7B4 - - - 1.0 - 1 - - 21.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Source/Additional Samples/Clima_Companion_App/Converter/InverseBoolConverter.cs b/Source/Additional Samples/Clima_Companion_App/Converter/InverseBoolConverter.cs deleted file mode 100644 index 35cadaf..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Converter/InverseBoolConverter.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Globalization; - -namespace MobileClima.Converter -{ - public class InverseBoolConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, CultureInfo culture) - { - return !(bool)value; - } - - public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) - { - return !(bool)value; - } - } -} \ No newline at end of file diff --git a/Source/Additional Samples/Clima_Companion_App/MauiProgram.cs b/Source/Additional Samples/Clima_Companion_App/MauiProgram.cs deleted file mode 100644 index 29a456e..0000000 --- a/Source/Additional Samples/Clima_Companion_App/MauiProgram.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace MobileClima; - -public static class MauiProgram -{ - public static MauiApp CreateMauiApp() - { - var builder = MauiApp.CreateBuilder(); - builder - .UseMauiApp() - .ConfigureFonts(fonts => - { - fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); - fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold"); - }); - - return builder.Build(); - } -} diff --git a/Source/Additional Samples/Clima_Companion_App/Platforms/Android/AndroidManifest.xml b/Source/Additional Samples/Clima_Companion_App/Platforms/Android/AndroidManifest.xml deleted file mode 100644 index 3bca0fc..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Platforms/Android/AndroidManifest.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/Source/Additional Samples/Clima_Companion_App/Platforms/Android/MainActivity.cs b/Source/Additional Samples/Clima_Companion_App/Platforms/Android/MainActivity.cs deleted file mode 100644 index 250d1e2..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Platforms/Android/MainActivity.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Android.App; -using Android.Content.PM; - -namespace MobileClima -{ - [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, - ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | - ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | - ConfigChanges.Density)] - public class MainActivity : MauiAppCompatActivity - { - } -} \ No newline at end of file diff --git a/Source/Additional Samples/Clima_Companion_App/Platforms/Android/MainApplication.cs b/Source/Additional Samples/Clima_Companion_App/Platforms/Android/MainApplication.cs deleted file mode 100644 index ffda6e7..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Platforms/Android/MainApplication.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Android.App; -using Android.Runtime; - -namespace MobileClima; - -[Application] -public class MainApplication : MauiApplication -{ - public MainApplication(IntPtr handle, JniHandleOwnership ownership) - : base(handle, ownership) - { - } - - protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); -} diff --git a/Source/Additional Samples/Clima_Companion_App/Platforms/Android/Resources/values/colors.xml b/Source/Additional Samples/Clima_Companion_App/Platforms/Android/Resources/values/colors.xml deleted file mode 100644 index 4b99715..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Platforms/Android/Resources/values/colors.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - #512BD4 - #14607F - #2B0B98 - \ No newline at end of file diff --git a/Source/Additional Samples/Clima_Companion_App/Platforms/Android/Resources/xml/network_security_config.xml b/Source/Additional Samples/Clima_Companion_App/Platforms/Android/Resources/xml/network_security_config.xml deleted file mode 100644 index 19ecbc6..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Platforms/Android/Resources/xml/network_security_config.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/Source/Additional Samples/Clima_Companion_App/Platforms/Windows/App.xaml b/Source/Additional Samples/Clima_Companion_App/Platforms/Windows/App.xaml deleted file mode 100644 index 7a756a2..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Platforms/Windows/App.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - diff --git a/Source/Additional Samples/Clima_Companion_App/Platforms/Windows/App.xaml.cs b/Source/Additional Samples/Clima_Companion_App/Platforms/Windows/App.xaml.cs deleted file mode 100644 index 55b2030..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Platforms/Windows/App.xaml.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Microsoft.UI.Xaml; - -// To learn more about WinUI, the WinUI project structure, -// and more about our project templates, see: http://aka.ms/winui-project-info. - -namespace MobileClima.WinUI; - -/// -/// Provides application-specific behavior to supplement the default Application class. -/// -public partial class App : MauiWinUIApplication -{ - /// - /// Initializes the singleton application object. This is the first line of authored code - /// executed, and as such is the logical equivalent of main() or WinMain(). - /// - public App() - { - this.InitializeComponent(); - } - - protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); -} - diff --git a/Source/Additional Samples/Clima_Companion_App/Platforms/Windows/Package.appxmanifest b/Source/Additional Samples/Clima_Companion_App/Platforms/Windows/Package.appxmanifest deleted file mode 100644 index 624679d..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Platforms/Windows/Package.appxmanifest +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - $placeholder$ - User Name - $placeholder$.png - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/Additional Samples/Clima_Companion_App/Platforms/Windows/app.manifest b/Source/Additional Samples/Clima_Companion_App/Platforms/Windows/app.manifest deleted file mode 100644 index 569ff7f..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Platforms/Windows/app.manifest +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - true/PM - PerMonitorV2, PerMonitor - - - diff --git a/Source/Additional Samples/Clima_Companion_App/Platforms/iOS/AppDelegate.cs b/Source/Additional Samples/Clima_Companion_App/Platforms/iOS/AppDelegate.cs deleted file mode 100644 index 7c55477..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Platforms/iOS/AppDelegate.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Foundation; - -namespace MobileClima; - -[Register("AppDelegate")] -public class AppDelegate : MauiUIApplicationDelegate -{ - protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); -} diff --git a/Source/Additional Samples/Clima_Companion_App/Platforms/iOS/Info.plist b/Source/Additional Samples/Clima_Companion_App/Platforms/iOS/Info.plist deleted file mode 100644 index 0004a4f..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Platforms/iOS/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - LSRequiresIPhoneOS - - UIDeviceFamily - - 1 - 2 - - UIRequiredDeviceCapabilities - - arm64 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - XSAppIconAssets - Assets.xcassets/appicon.appiconset - - diff --git a/Source/Additional Samples/Clima_Companion_App/Platforms/iOS/Program.cs b/Source/Additional Samples/Clima_Companion_App/Platforms/iOS/Program.cs deleted file mode 100644 index 2f6232f..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Platforms/iOS/Program.cs +++ /dev/null @@ -1,15 +0,0 @@ -using ObjCRuntime; -using UIKit; - -namespace MobileClima; - -public class Program -{ - // This is the main entry point of the application. - static void Main(string[] args) - { - // if you want to use a different Application Delegate class from "AppDelegate" - // you can specify it here. - UIApplication.Main(args, null, typeof(AppDelegate)); - } -} diff --git a/Source/Additional Samples/Clima_Companion_App/Properties/launchSettings.json b/Source/Additional Samples/Clima_Companion_App/Properties/launchSettings.json deleted file mode 100644 index edf8aad..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Properties/launchSettings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "profiles": { - "Windows Machine": { - "commandName": "MsixPackage", - "nativeDebugging": false - } - } -} \ No newline at end of file diff --git a/Source/Additional Samples/Clima_Companion_App/Resources/AppIcon/appicon.svg b/Source/Additional Samples/Clima_Companion_App/Resources/AppIcon/appicon.svg deleted file mode 100644 index 397c060..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Resources/AppIcon/appicon.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/Source/Additional Samples/Clima_Companion_App/Resources/AppIcon/appiconfg.svg b/Source/Additional Samples/Clima_Companion_App/Resources/AppIcon/appiconfg.svg deleted file mode 100644 index 60f896c..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Resources/AppIcon/appiconfg.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Source/Additional Samples/Clima_Companion_App/Resources/Fonts/OpenSans-Regular.ttf b/Source/Additional Samples/Clima_Companion_App/Resources/Fonts/OpenSans-Regular.ttf deleted file mode 100644 index 6cbaf4b..0000000 Binary files a/Source/Additional Samples/Clima_Companion_App/Resources/Fonts/OpenSans-Regular.ttf and /dev/null differ diff --git a/Source/Additional Samples/Clima_Companion_App/Resources/Fonts/OpenSans-Semibold.ttf b/Source/Additional Samples/Clima_Companion_App/Resources/Fonts/OpenSans-Semibold.ttf deleted file mode 100644 index 554d68a..0000000 Binary files a/Source/Additional Samples/Clima_Companion_App/Resources/Fonts/OpenSans-Semibold.ttf and /dev/null differ diff --git a/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_ble_pair.svg b/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_ble_pair.svg deleted file mode 100644 index 4b4bc25..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_ble_pair.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_ble_paired.svg b/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_ble_paired.svg deleted file mode 100644 index 8253be2..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_ble_paired.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_clima_hack_kit.png b/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_clima_hack_kit.png deleted file mode 100644 index 718605d..0000000 Binary files a/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_clima_hack_kit.png and /dev/null differ diff --git a/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_clima_pro.png b/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_clima_pro.png deleted file mode 100644 index 8990db0..0000000 Binary files a/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_clima_pro.png and /dev/null differ diff --git a/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_search.png b/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_search.png deleted file mode 100644 index 40341cc..0000000 Binary files a/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_search.png and /dev/null differ diff --git a/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_search.svg b/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_search.svg deleted file mode 100644 index 9431fbf..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Resources/Images/img_search.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Source/Additional Samples/Clima_Companion_App/Resources/Raw/AboutAssets.txt b/Source/Additional Samples/Clima_Companion_App/Resources/Raw/AboutAssets.txt deleted file mode 100644 index 15d6244..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Resources/Raw/AboutAssets.txt +++ /dev/null @@ -1,15 +0,0 @@ -Any raw assets you want to be deployed with your application can be placed in -this directory (and child directories). Deployment of the asset to your application -is automatically handled by the following `MauiAsset` Build Action within your `.csproj`. - - - -These files will be deployed with you package and will be accessible using Essentials: - - async Task LoadMauiAsset() - { - using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt"); - using var reader = new StreamReader(stream); - - var contents = reader.ReadToEnd(); - } diff --git a/Source/Additional Samples/Clima_Companion_App/Resources/Splash/splash.svg b/Source/Additional Samples/Clima_Companion_App/Resources/Splash/splash.svg deleted file mode 100644 index 8db16c4..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Resources/Splash/splash.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Source/Additional Samples/Clima_Companion_App/Resources/Styles/Colors.xaml b/Source/Additional Samples/Clima_Companion_App/Resources/Styles/Colors.xaml deleted file mode 100644 index d995b9e..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Resources/Styles/Colors.xaml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - #512BD4 - #DFD8F7 - #2B0B98 - White - Black - #E1E1E1 - #C8C8C8 - #ACACAC - #919191 - #6E6E6E - #404040 - #212121 - #141414 - #23ABE3 - #555 - - - - - - - - - - - - - - - - - - #F7B548 - #FFD590 - #FFE5B9 - #28C2D1 - #7BDDEF - #C3F2F4 - #3E8EED - #72ACF1 - #A7CBF6 - - \ No newline at end of file diff --git a/Source/Additional Samples/Clima_Companion_App/Resources/Styles/Styles.xaml b/Source/Additional Samples/Clima_Companion_App/Resources/Styles/Styles.xaml deleted file mode 100644 index d8d3c29..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Resources/Styles/Styles.xaml +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Source/Additional Samples/Clima_Companion_App/Utils/NetworkManager.cs b/Source/Additional Samples/Clima_Companion_App/Utils/NetworkManager.cs deleted file mode 100644 index 4adf5d7..0000000 --- a/Source/Additional Samples/Clima_Companion_App/Utils/NetworkManager.cs +++ /dev/null @@ -1,51 +0,0 @@ -namespace MobileClima.Utils -{ - public static class NetworkManager - { - static NetworkManager() { } - - /// - /// Fetches the climate readings from the Web API Endpoint - /// - /// - public static async Task GetAsync(string ipAddress) - { - using (HttpClient client = new HttpClient() - { - BaseAddress = new Uri($"http://{ipAddress}:2792/"), - Timeout = TimeSpan.FromMinutes(5) - }) - { - try - { - var response = await client.GetAsync("ClimateData", HttpCompletionOption.ResponseContentRead); - - if (response.IsSuccessStatusCode) - { - string json = await response.Content.ReadAsStringAsync(); - - Console.WriteLine(json); - } - else - { - throw new InvalidOperationException("Could not connect to device"); - } - - //var values = System.Text.Json.JsonSerializer.Deserialize(json, typeof(List)); - - return response; - } - catch (TaskCanceledException) - { - Console.WriteLine("Request time out."); - return null; - } - catch (Exception e) - { - Console.WriteLine($"Request went sideways: {e.Message}"); - return null; - } - } - } - } -} \ No newline at end of file diff --git a/Source/Additional Samples/Clima_Companion_App/View/BluetoothPage.xaml b/Source/Additional Samples/Clima_Companion_App/View/BluetoothPage.xaml deleted file mode 100644 index efebad2..0000000 --- a/Source/Additional Samples/Clima_Companion_App/View/BluetoothPage.xaml +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - -