From f2322dadf57f2266710cc5a4199011cc60cb34b6 Mon Sep 17 00:00:00 2001 From: Adrian Stevens Date: Sat, 4 Feb 2023 22:06:06 -0800 Subject: [PATCH 1/8] Add GNNS5 driver --- Source/CGNSS5/Driver/CGNSS5.cs | 18 +++++ Source/CGNSS5/Driver/CGNSS5.csproj | 24 ++++++ .../Sample/CGNSS5_Sample/CGNSS5_Sample.csproj | 12 +++ .../CGNSS5/Sample/CGNSS5_Sample/MeadowApp.cs | 77 +++++++++++++++++++ Source/mikroBUS.sln | 23 ++++++ 5 files changed, 154 insertions(+) create mode 100644 Source/CGNSS5/Driver/CGNSS5.cs create mode 100644 Source/CGNSS5/Driver/CGNSS5.csproj create mode 100644 Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj create mode 100644 Source/CGNSS5/Sample/CGNSS5_Sample/MeadowApp.cs diff --git a/Source/CGNSS5/Driver/CGNSS5.cs b/Source/CGNSS5/Driver/CGNSS5.cs new file mode 100644 index 0000000..59518e3 --- /dev/null +++ b/Source/CGNSS5/Driver/CGNSS5.cs @@ -0,0 +1,18 @@ +using Meadow.Foundation.Sensors.Gnss; +using Meadow.Hardware; + +namespace Meadow.Foundation.mikroBUS.Sensors.Gnss +{ + /// + /// Represents a mikroBUS GNSS 5 board (Neo M8) + /// + public class CGNSS5 : NeoM8 + { + /// + /// Creates a new CGNSS5 object + /// + public CGNSS5(IMeadowDevice device, SerialPortName serialPortName, IPin resetPin, IPin ppsPin = null) + : base(device, serialPortName, resetPin, ppsPin) + { } + } +} \ No newline at end of file diff --git a/Source/CGNSS5/Driver/CGNSS5.csproj b/Source/CGNSS5/Driver/CGNSS5.csproj new file mode 100644 index 0000000..81d4352 --- /dev/null +++ b/Source/CGNSS5/Driver/CGNSS5.csproj @@ -0,0 +1,24 @@ + + + true + icon.png + Wilderness Labs, Inc + netstandard2.1 + Library + CGNSS% + Wilderness Labs, Inc + http://developer.wildernesslabs.co/Meadow/Meadow.Foundation/ + Meadow.Foundation.mikroBUS.Sensors.Gnss.CGNSS10 + https://github.com/WildernessLabs/Meadow.Foundation + Meadow,Meadow.Foundation,MikroBus,Mikroe,MikroElectronika,GPS,GNSS,Click,5 + 0.1.0 + true + MikroElectronika Serial I2C Neo M8 GPS / GNSS MikroBus click board + + + + + + + + diff --git a/Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj b/Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj new file mode 100644 index 0000000..89196fa --- /dev/null +++ b/Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj @@ -0,0 +1,12 @@ + + + netstandard2.1 + true + Library + App + + + + + + diff --git a/Source/CGNSS5/Sample/CGNSS5_Sample/MeadowApp.cs b/Source/CGNSS5/Sample/CGNSS5_Sample/MeadowApp.cs new file mode 100644 index 0000000..0e14bc2 --- /dev/null +++ b/Source/CGNSS5/Sample/CGNSS5_Sample/MeadowApp.cs @@ -0,0 +1,77 @@ +using Meadow; +using Meadow.Devices; +using Meadow.Foundation.mikroBUS.Sensors.Gnss; +using Meadow.Peripherals.Sensors.Location.Gnss; +using System.Threading.Tasks; + +namespace CGNSS5_Sample +{ + // Change F7FeatherV2 to F7FeatherV1 for V1.x boards + public class MeadowApp : App + { + // + + CGNSS5 gps; + + public override Task Initialize() + { + Resolver.Log.Info("Initializing ..."); + + gps = new CGNSS5(Device, Device.PlatformOS.GetSerialPortName("COM1"), Device.Pins.D09, Device.Pins.D11); + + gps.GgaReceived += (object sender, GnssPositionInfo location) => + { + Resolver.Log.Info("*********************************************"); + Resolver.Log.Info($"{location}"); + Resolver.Log.Info("*********************************************"); + }; + // GLL + gps.GllReceived += (object sender, GnssPositionInfo location) => + { + Resolver.Log.Info("*********************************************"); + Resolver.Log.Info($"{location}"); + Resolver.Log.Info("*********************************************"); + }; + // GSA + gps.GsaReceived += (object sender, ActiveSatellites activeSatellites) => + { + Resolver.Log.Info("*********************************************"); + Resolver.Log.Info($"{activeSatellites}"); + Resolver.Log.Info("*********************************************"); + }; + // RMC (recommended minimum) + gps.RmcReceived += (object sender, GnssPositionInfo positionCourseAndTime) => + { + Resolver.Log.Info("*********************************************"); + Resolver.Log.Info($"{positionCourseAndTime}"); + Resolver.Log.Info("*********************************************"); + + }; + // VTG (course made good) + gps.VtgReceived += (object sender, CourseOverGround courseAndVelocity) => + { + Resolver.Log.Info("*********************************************"); + Resolver.Log.Info($"{courseAndVelocity}"); + Resolver.Log.Info("*********************************************"); + }; + // GSV (satellites in view) + gps.GsvReceived += (object sender, SatellitesInView satellites) => + { + Resolver.Log.Info("*********************************************"); + Resolver.Log.Info($"{satellites}"); + Resolver.Log.Info("*********************************************"); + }; + + return Task.CompletedTask; + } + + public override Task Run() + { + gps.StartUpdating(); + + return Task.CompletedTask; + } + + // + } +} \ No newline at end of file diff --git a/Source/mikroBUS.sln b/Source/mikroBUS.sln index 5c0e68f..ca7240b 100644 --- a/Source/mikroBUS.sln +++ b/Source/mikroBUS.sln @@ -83,6 +83,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sensors.Atmospheric.Sht4x", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Displays.Max7219", "..\..\Meadow.Foundation\Source\Meadow.Foundation.Peripherals\Displays.Max7219\Driver\Displays.Max7219.csproj", "{0A92D618-C408-4A00-92E6-D36440D1E18D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CGNSS5", "CGNSS5", "{12F537E2-13DC-4023-89E4-9E8515809604}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CGNSS5", "CGNSS5\Driver\CGNSS5.csproj", "{EEDDAF1D-2E35-4A7A-8C94-9F6BCA9289FB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sample", "Sample", "{C259536A-75D7-4D8A-B4F5-8C0306A897DE}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CGNSS5_Sample", "CGNSS5\Sample\CGNSS5_Sample\CGNSS5_Sample.csproj", "{1B9F8444-BAC8-423C-9D01-3D354FB8C083}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -239,6 +247,18 @@ Global {0A92D618-C408-4A00-92E6-D36440D1E18D}.Release|Any CPU.ActiveCfg = Release|Any CPU {0A92D618-C408-4A00-92E6-D36440D1E18D}.Release|Any CPU.Build.0 = Release|Any CPU {0A92D618-C408-4A00-92E6-D36440D1E18D}.Release|Any CPU.Deploy.0 = Release|Any CPU + {EEDDAF1D-2E35-4A7A-8C94-9F6BCA9289FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EEDDAF1D-2E35-4A7A-8C94-9F6BCA9289FB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EEDDAF1D-2E35-4A7A-8C94-9F6BCA9289FB}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {EEDDAF1D-2E35-4A7A-8C94-9F6BCA9289FB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EEDDAF1D-2E35-4A7A-8C94-9F6BCA9289FB}.Release|Any CPU.Build.0 = Release|Any CPU + {EEDDAF1D-2E35-4A7A-8C94-9F6BCA9289FB}.Release|Any CPU.Deploy.0 = Release|Any CPU + {1B9F8444-BAC8-423C-9D01-3D354FB8C083}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B9F8444-BAC8-423C-9D01-3D354FB8C083}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B9F8444-BAC8-423C-9D01-3D354FB8C083}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {1B9F8444-BAC8-423C-9D01-3D354FB8C083}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B9F8444-BAC8-423C-9D01-3D354FB8C083}.Release|Any CPU.Build.0 = Release|Any CPU + {1B9F8444-BAC8-423C-9D01-3D354FB8C083}.Release|Any CPU.Deploy.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -276,6 +296,9 @@ Global {A6675803-03EC-41E5-973F-12CD684FCA81} = {20E3A0B4-6103-4EAD-BD90-90C673E07DCC} {A5DAEA7F-86B7-4BE8-834D-248F5B0CEBE6} = {20E3A0B4-6103-4EAD-BD90-90C673E07DCC} {0A92D618-C408-4A00-92E6-D36440D1E18D} = {20E3A0B4-6103-4EAD-BD90-90C673E07DCC} + {EEDDAF1D-2E35-4A7A-8C94-9F6BCA9289FB} = {12F537E2-13DC-4023-89E4-9E8515809604} + {C259536A-75D7-4D8A-B4F5-8C0306A897DE} = {12F537E2-13DC-4023-89E4-9E8515809604} + {1B9F8444-BAC8-423C-9D01-3D354FB8C083} = {C259536A-75D7-4D8A-B4F5-8C0306A897DE} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {BF2FC8CE-57C6-468C-B82D-D8204E6D9360} From aaef3c8115721dcd8da08feed6db2274aadfa5f8 Mon Sep 17 00:00:00 2001 From: Adrian Stevens Date: Mon, 6 Feb 2023 11:46:00 -0800 Subject: [PATCH 2/8] Add I2C support to GNSS5 + cleanup --- Source/CGNSS5/Driver/CGNSS5.cs | 9 ++++++++- Source/CGNSS5/Driver/CGNSS5.csproj | 2 +- Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj | 3 ++- Source/CGNSS5/Sample/CGNSS5_Sample/MeadowApp.cs | 4 +++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Source/CGNSS5/Driver/CGNSS5.cs b/Source/CGNSS5/Driver/CGNSS5.cs index 59518e3..46753df 100644 --- a/Source/CGNSS5/Driver/CGNSS5.cs +++ b/Source/CGNSS5/Driver/CGNSS5.cs @@ -9,10 +9,17 @@ namespace Meadow.Foundation.mikroBUS.Sensors.Gnss public class CGNSS5 : NeoM8 { /// - /// Creates a new CGNSS5 object + /// Creates a new CGNSS5 object using serial /// public CGNSS5(IMeadowDevice device, SerialPortName serialPortName, IPin resetPin, IPin ppsPin = null) : base(device, serialPortName, resetPin, ppsPin) { } + + /// + /// Creates a new CGNSS5 object using I2C + /// + public CGNSS5(IMeadowDevice device, II2cBus i2cBus, IPin resetPin, IPin ppsPin = null) + : base(device, i2cBus, (byte)Addresses.Default, resetPin: resetPin, ppsPin: ppsPin) + { } } } \ No newline at end of file diff --git a/Source/CGNSS5/Driver/CGNSS5.csproj b/Source/CGNSS5/Driver/CGNSS5.csproj index 81d4352..49ca318 100644 --- a/Source/CGNSS5/Driver/CGNSS5.csproj +++ b/Source/CGNSS5/Driver/CGNSS5.csproj @@ -19,6 +19,6 @@ - + diff --git a/Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj b/Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj index 89196fa..d4a70d2 100644 --- a/Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj +++ b/Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 true @@ -7,6 +7,7 @@ + diff --git a/Source/CGNSS5/Sample/CGNSS5_Sample/MeadowApp.cs b/Source/CGNSS5/Sample/CGNSS5_Sample/MeadowApp.cs index 0e14bc2..7ac972b 100644 --- a/Source/CGNSS5/Sample/CGNSS5_Sample/MeadowApp.cs +++ b/Source/CGNSS5/Sample/CGNSS5_Sample/MeadowApp.cs @@ -17,7 +17,9 @@ public override Task Initialize() { Resolver.Log.Info("Initializing ..."); - gps = new CGNSS5(Device, Device.PlatformOS.GetSerialPortName("COM1"), Device.Pins.D09, Device.Pins.D11); + //gps = new CGNSS5(Device, Device.PlatformOS.GetSerialPortName("COM1"), Device.Pins.D09, Device.Pins.D11); + + gps = new CGNSS5(Device, Device.CreateI2cBus(), resetPin: Device.Pins.D09, ppsPin: Device.Pins.D11); gps.GgaReceived += (object sender, GnssPositionInfo location) => { From c3a1ced6836f10ab97d4d550c668d98dbaae5d41 Mon Sep 17 00:00:00 2001 From: Adrian Stevens Date: Wed, 8 Feb 2023 15:08:30 -0800 Subject: [PATCH 3/8] Denugetize --- Source/C16x9/Driver/C16x9.csproj | 4 ++-- Source/C16x9/Sample/C16x9G_Sample/C16x9_Sample.csproj | 2 +- Source/C8800Retro/Driver/C8800Retro.csproj | 2 +- .../Sample/C8800Retro_Sample/C8800Retro_Sample.csproj | 2 +- Source/C8x8/Driver/C8x8.csproj | 2 +- Source/C8x8/Sample/C8x8_Sample/C8x8_Sample.csproj | 2 +- Source/CButton/Driver/CButton.csproj | 2 +- Source/CButton/Sample/CButton_Sample/CButton_Sample.csproj | 2 +- Source/CGNSS10/Driver/CGNSS10.csproj | 4 ++-- Source/CGNSS10/Sample/CGNSS10_Sample/CGNSS10_Sample.csproj | 2 +- Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj | 5 ++--- Source/CJoystick/Driver/CJoystick.csproj | 2 +- .../Sample/CJoystick_Sample/CJoystick_Sample.csproj | 2 +- Source/CTempHum15/Driver/CTempHum15.csproj | 2 +- .../Sample/CTempHum15_Sample/CTempHum15_Sample.csproj | 2 +- 15 files changed, 18 insertions(+), 19 deletions(-) diff --git a/Source/C16x9/Driver/C16x9.csproj b/Source/C16x9/Driver/C16x9.csproj index 90365e9..0bb54bf 100644 --- a/Source/C16x9/Driver/C16x9.csproj +++ b/Source/C16x9/Driver/C16x9.csproj @@ -19,7 +19,7 @@ - - + + diff --git a/Source/C16x9/Sample/C16x9G_Sample/C16x9_Sample.csproj b/Source/C16x9/Sample/C16x9G_Sample/C16x9_Sample.csproj index 7c9fa98..fca2053 100644 --- a/Source/C16x9/Sample/C16x9G_Sample/C16x9_Sample.csproj +++ b/Source/C16x9/Sample/C16x9G_Sample/C16x9_Sample.csproj @@ -6,7 +6,7 @@ App - + diff --git a/Source/C8800Retro/Driver/C8800Retro.csproj b/Source/C8800Retro/Driver/C8800Retro.csproj index b66135e..770b166 100644 --- a/Source/C8800Retro/Driver/C8800Retro.csproj +++ b/Source/C8800Retro/Driver/C8800Retro.csproj @@ -19,6 +19,6 @@ - + diff --git a/Source/C8800Retro/Sample/C8800Retro_Sample/C8800Retro_Sample.csproj b/Source/C8800Retro/Sample/C8800Retro_Sample/C8800Retro_Sample.csproj index 42ed4ad..9a26403 100644 --- a/Source/C8800Retro/Sample/C8800Retro_Sample/C8800Retro_Sample.csproj +++ b/Source/C8800Retro/Sample/C8800Retro_Sample/C8800Retro_Sample.csproj @@ -6,7 +6,7 @@ App - + diff --git a/Source/C8x8/Driver/C8x8.csproj b/Source/C8x8/Driver/C8x8.csproj index e72b5ae..be83bbd 100644 --- a/Source/C8x8/Driver/C8x8.csproj +++ b/Source/C8x8/Driver/C8x8.csproj @@ -19,6 +19,6 @@ - + diff --git a/Source/C8x8/Sample/C8x8_Sample/C8x8_Sample.csproj b/Source/C8x8/Sample/C8x8_Sample/C8x8_Sample.csproj index 14f3b11..4338df5 100644 --- a/Source/C8x8/Sample/C8x8_Sample/C8x8_Sample.csproj +++ b/Source/C8x8/Sample/C8x8_Sample/C8x8_Sample.csproj @@ -6,7 +6,7 @@ App - + diff --git a/Source/CButton/Driver/CButton.csproj b/Source/CButton/Driver/CButton.csproj index 41c0b52..4d1518f 100644 --- a/Source/CButton/Driver/CButton.csproj +++ b/Source/CButton/Driver/CButton.csproj @@ -19,6 +19,6 @@ - + diff --git a/Source/CButton/Sample/CButton_Sample/CButton_Sample.csproj b/Source/CButton/Sample/CButton_Sample/CButton_Sample.csproj index 3cd19cf..68e8049 100644 --- a/Source/CButton/Sample/CButton_Sample/CButton_Sample.csproj +++ b/Source/CButton/Sample/CButton_Sample/CButton_Sample.csproj @@ -6,7 +6,7 @@ App - + diff --git a/Source/CGNSS10/Driver/CGNSS10.csproj b/Source/CGNSS10/Driver/CGNSS10.csproj index 51d2c90..4aa6e25 100644 --- a/Source/CGNSS10/Driver/CGNSS10.csproj +++ b/Source/CGNSS10/Driver/CGNSS10.csproj @@ -1,4 +1,4 @@ - + true icon.png @@ -19,6 +19,6 @@ - + diff --git a/Source/CGNSS10/Sample/CGNSS10_Sample/CGNSS10_Sample.csproj b/Source/CGNSS10/Sample/CGNSS10_Sample/CGNSS10_Sample.csproj index 5190e19..e6f2494 100644 --- a/Source/CGNSS10/Sample/CGNSS10_Sample/CGNSS10_Sample.csproj +++ b/Source/CGNSS10/Sample/CGNSS10_Sample/CGNSS10_Sample.csproj @@ -6,7 +6,7 @@ App - + diff --git a/Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj b/Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj index d4a70d2..29d9d06 100644 --- a/Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj +++ b/Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 true @@ -6,8 +6,7 @@ App - - + diff --git a/Source/CJoystick/Driver/CJoystick.csproj b/Source/CJoystick/Driver/CJoystick.csproj index 9fb33fa..49cb7f4 100644 --- a/Source/CJoystick/Driver/CJoystick.csproj +++ b/Source/CJoystick/Driver/CJoystick.csproj @@ -19,6 +19,6 @@ - + diff --git a/Source/CJoystick/Sample/CJoystick_Sample/CJoystick_Sample.csproj b/Source/CJoystick/Sample/CJoystick_Sample/CJoystick_Sample.csproj index 4a9d929..c502486 100644 --- a/Source/CJoystick/Sample/CJoystick_Sample/CJoystick_Sample.csproj +++ b/Source/CJoystick/Sample/CJoystick_Sample/CJoystick_Sample.csproj @@ -6,7 +6,7 @@ App - + diff --git a/Source/CTempHum15/Driver/CTempHum15.csproj b/Source/CTempHum15/Driver/CTempHum15.csproj index e1e448a..d5f84ef 100644 --- a/Source/CTempHum15/Driver/CTempHum15.csproj +++ b/Source/CTempHum15/Driver/CTempHum15.csproj @@ -19,6 +19,6 @@ - + diff --git a/Source/CTempHum15/Sample/CTempHum15_Sample/CTempHum15_Sample.csproj b/Source/CTempHum15/Sample/CTempHum15_Sample/CTempHum15_Sample.csproj index 46296e5..6fd945d 100644 --- a/Source/CTempHum15/Sample/CTempHum15_Sample/CTempHum15_Sample.csproj +++ b/Source/CTempHum15/Sample/CTempHum15_Sample/CTempHum15_Sample.csproj @@ -6,7 +6,7 @@ App - + From 14f4f1903b0c62e2ca3097d068155a4b71ab93de Mon Sep 17 00:00:00 2001 From: Adrian Stevens Date: Thu, 16 Feb 2023 20:33:39 -0800 Subject: [PATCH 4/8] Pin controller updates --- Source/C16x9/Driver/C16x9.cs | 5 ++--- Source/C16x9/Sample/C16x9G_Sample/MeadowApp.cs | 2 +- Source/C8800Retro/Driver/C8800Retro.cs | 5 ++--- .../Sample/C8800Retro_Sample/C8800Retro_Sample.csproj | 4 ++-- Source/C8800Retro/Sample/C8800Retro_Sample/MeadowApp.cs | 2 +- Source/C8x8/Driver/C8x8.cs | 5 ++--- Source/C8x8/Sample/C8x8_Sample/MeadowApp.cs | 2 +- Source/CButton/Driver/CButton.cs | 7 +++---- Source/CButton/Sample/CButton_Sample/MeadowApp.cs | 2 +- Source/CGNSS10/Driver/CGNSS10.cs | 7 +++++++ Source/CGNSS5/Driver/CGNSS5.cs | 4 ++-- Source/CGNSS5/Sample/CGNSS5_Sample/MeadowApp.cs | 4 ++-- Source/CJoystick/Driver/CJoystick.cs | 5 ++--- Source/CJoystick/Sample/CJoystick_Sample/MeadowApp.cs | 2 +- 14 files changed, 29 insertions(+), 27 deletions(-) diff --git a/Source/C16x9/Driver/C16x9.cs b/Source/C16x9/Driver/C16x9.cs index 2f7105d..703a998 100644 --- a/Source/C16x9/Driver/C16x9.cs +++ b/Source/C16x9/Driver/C16x9.cs @@ -92,11 +92,10 @@ public C16x9(IDigitalOutputPort onOffPort, II2cBus i2cBus, byte address = (byte) /// /// Creates a CharlieWing driver /// - /// Meadow device controller /// IO pin to controller display on/off state /// I2C bus - public C16x9(IMeadowDevice device, IPin onOffPin, II2cBus i2cBus) : - this(device.CreateDigitalOutputPort(onOffPin), i2cBus, (byte)Is31fl3731.Addresses.Default) + public C16x9(IPin onOffPin, II2cBus i2cBus) : + this(onOffPin.CreateDigitalOutputPort(), i2cBus, (byte)Is31fl3731.Addresses.Default) { } diff --git a/Source/C16x9/Sample/C16x9G_Sample/MeadowApp.cs b/Source/C16x9/Sample/C16x9G_Sample/MeadowApp.cs index 76384b6..75e2fd5 100644 --- a/Source/C16x9/Sample/C16x9G_Sample/MeadowApp.cs +++ b/Source/C16x9/Sample/C16x9G_Sample/MeadowApp.cs @@ -17,7 +17,7 @@ public MeadowApp() { Console.WriteLine("Initializing ..."); - c16x9 = new C16x9(Device, Device.Pins.D14, Device.CreateI2cBus(Meadow.Hardware.I2cBusSpeed.Standard)); + c16x9 = new C16x9(Device.Pins.D14, Device.CreateI2cBus(Meadow.Hardware.I2cBusSpeed.Standard)); c16x9.IgnoreOutOfBoundsPixels = true; c16x9.Clear(); diff --git a/Source/C8800Retro/Driver/C8800Retro.cs b/Source/C8800Retro/Driver/C8800Retro.cs index 7fdb8c6..1a40f05 100644 --- a/Source/C8800Retro/Driver/C8800Retro.cs +++ b/Source/C8800Retro/Driver/C8800Retro.cs @@ -12,12 +12,11 @@ public partial class C8800Retro : As1115 /// /// Creates an Altair 8800 retro click board object /// - /// The Meadow device /// The I2C bus /// The interrupt pin /// The I2C address - public C8800Retro(IMeadowDevice device, II2cBus i2cBus, IPin buttonInterruptPin, byte address = 0) - : base(device, i2cBus, buttonInterruptPin, address) + public C8800Retro(II2cBus i2cBus, IPin buttonInterruptPin, byte address = 0) + : base(i2cBus, buttonInterruptPin, address) { } /// diff --git a/Source/C8800Retro/Sample/C8800Retro_Sample/C8800Retro_Sample.csproj b/Source/C8800Retro/Sample/C8800Retro_Sample/C8800Retro_Sample.csproj index 9a26403..2b9b6f8 100644 --- a/Source/C8800Retro/Sample/C8800Retro_Sample/C8800Retro_Sample.csproj +++ b/Source/C8800Retro/Sample/C8800Retro_Sample/C8800Retro_Sample.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 true @@ -7,6 +7,6 @@ - + diff --git a/Source/C8800Retro/Sample/C8800Retro_Sample/MeadowApp.cs b/Source/C8800Retro/Sample/C8800Retro_Sample/MeadowApp.cs index 035c911..22b1dee 100644 --- a/Source/C8800Retro/Sample/C8800Retro_Sample/MeadowApp.cs +++ b/Source/C8800Retro/Sample/C8800Retro_Sample/MeadowApp.cs @@ -21,7 +21,7 @@ public override Task Initialize() { Console.WriteLine("Initializing ..."); - altair = new C8800Retro(Device, Device.CreateI2cBus(), Device.Pins.D03); + altair = new C8800Retro(Device.CreateI2cBus(), Device.Pins.D03); var button1B = altair.GetButton(C8800Retro.ButtonColumn._1, C8800Retro.ButtonRow.B); button1B.Clicked += Button1B_Clicked; diff --git a/Source/C8x8/Driver/C8x8.cs b/Source/C8x8/Driver/C8x8.cs index ef2cfe4..b6fed4c 100644 --- a/Source/C8x8/Driver/C8x8.cs +++ b/Source/C8x8/Driver/C8x8.cs @@ -20,11 +20,10 @@ public C8x8(ISpiBus spiBus, IDigitalOutputPort chipselectPort) /// /// Creates a new MikroBus 8x8 object /// - /// Meadow Device /// SPI bus /// Chip select pin - public C8x8(IMeadowDevice device, ISpiBus spiBus, IPin chipSelectPin) - : base(device, spiBus, chipSelectPin, 1, Max7219Mode.Display) + public C8x8(ISpiBus spiBus, IPin chipSelectPin) + : base(spiBus, chipSelectPin, 1, Max7219Mode.Display) { } } } \ No newline at end of file diff --git a/Source/C8x8/Sample/C8x8_Sample/MeadowApp.cs b/Source/C8x8/Sample/C8x8_Sample/MeadowApp.cs index c2438ca..5d1d166 100644 --- a/Source/C8x8/Sample/C8x8_Sample/MeadowApp.cs +++ b/Source/C8x8/Sample/C8x8_Sample/MeadowApp.cs @@ -17,7 +17,7 @@ public MeadowApp() { Console.WriteLine("Initializing ..."); - c8x8 = new C8x8(Device, Device.CreateSpiBus(), Device.Pins.D14); + c8x8 = new C8x8(Device.CreateSpiBus(), Device.Pins.D14); var graphics = new MicroGraphics(c8x8) { diff --git a/Source/CButton/Driver/CButton.cs b/Source/CButton/Driver/CButton.cs index e1a5069..35c25b4 100644 --- a/Source/CButton/Driver/CButton.cs +++ b/Source/CButton/Driver/CButton.cs @@ -35,13 +35,12 @@ public float Brightness /// /// Creates a new CButton object /// - /// Meadow device /// Led pin /// Button pin - public CButton(IMeadowDevice device, IPin ledPin, IPin buttonPin) - : base(device, buttonPin, ResistorMode.InternalPullUp) + public CButton(IPin ledPin, IPin buttonPin) + : base(buttonPin, ResistorMode.InternalPullUp) { - pwmLed = new PwmLed(device, ledPin, new Units.Voltage(TypicalForwardVoltage.Green)); + pwmLed = new PwmLed(ledPin, new Units.Voltage(TypicalForwardVoltage.Green)); } /// diff --git a/Source/CButton/Sample/CButton_Sample/MeadowApp.cs b/Source/CButton/Sample/CButton_Sample/MeadowApp.cs index a60588c..193bf08 100644 --- a/Source/CButton/Sample/CButton_Sample/MeadowApp.cs +++ b/Source/CButton/Sample/CButton_Sample/MeadowApp.cs @@ -16,7 +16,7 @@ public MeadowApp() { Console.WriteLine("Initializing ..."); - ledButton = new CButton(Device, Device.Pins.D03, Device.Pins.D04); + ledButton = new CButton(Device.Pins.D03, Device.Pins.D04); ledButton.StartPulse(TimeSpan.FromSeconds(2), 0.75f, 0); ledButton.Clicked += (s, e) => diff --git a/Source/CGNSS10/Driver/CGNSS10.cs b/Source/CGNSS10/Driver/CGNSS10.cs index 5b6b69f..390b0d0 100644 --- a/Source/CGNSS10/Driver/CGNSS10.cs +++ b/Source/CGNSS10/Driver/CGNSS10.cs @@ -14,5 +14,12 @@ public class CGNSS10 : NeoM8 public CGNSS10(ISpiBus spiBus, IDigitalOutputPort chipSelectPort, IDigitalOutputPort resetPort = null) : base(spiBus, chipSelectPort, resetPort) { } + + /// + /// Creates a new CGNSS10 object + /// + public CGNSS10(ISpiBus spiBus, IPin chipSelectPin, IPin resetPin = null) + : base(spiBus, chipSelectPin, resetPin) + { } } } \ No newline at end of file diff --git a/Source/CGNSS5/Driver/CGNSS5.cs b/Source/CGNSS5/Driver/CGNSS5.cs index 46753df..f85cbaa 100644 --- a/Source/CGNSS5/Driver/CGNSS5.cs +++ b/Source/CGNSS5/Driver/CGNSS5.cs @@ -18,8 +18,8 @@ public CGNSS5(IMeadowDevice device, SerialPortName serialPortName, IPin resetPin /// /// Creates a new CGNSS5 object using I2C /// - public CGNSS5(IMeadowDevice device, II2cBus i2cBus, IPin resetPin, IPin ppsPin = null) - : base(device, i2cBus, (byte)Addresses.Default, resetPin: resetPin, ppsPin: ppsPin) + public CGNSS5(II2cBus i2cBus, IPin resetPin, IPin ppsPin = null) + : base(i2cBus, (byte)Addresses.Default, resetPin: resetPin, ppsPin: ppsPin) { } } } \ No newline at end of file diff --git a/Source/CGNSS5/Sample/CGNSS5_Sample/MeadowApp.cs b/Source/CGNSS5/Sample/CGNSS5_Sample/MeadowApp.cs index 7ac972b..504c7be 100644 --- a/Source/CGNSS5/Sample/CGNSS5_Sample/MeadowApp.cs +++ b/Source/CGNSS5/Sample/CGNSS5_Sample/MeadowApp.cs @@ -17,9 +17,9 @@ public override Task Initialize() { Resolver.Log.Info("Initializing ..."); - //gps = new CGNSS5(Device, Device.PlatformOS.GetSerialPortName("COM1"), Device.Pins.D09, Device.Pins.D11); + //gps = new CGNSS5(Device.PlatformOS.GetSerialPortName("COM1"), Device.Pins.D09, Device.Pins.D11); - gps = new CGNSS5(Device, Device.CreateI2cBus(), resetPin: Device.Pins.D09, ppsPin: Device.Pins.D11); + gps = new CGNSS5(Device.CreateI2cBus(), resetPin: Device.Pins.D09, ppsPin: Device.Pins.D11); gps.GgaReceived += (object sender, GnssPositionInfo location) => { diff --git a/Source/CJoystick/Driver/CJoystick.cs b/Source/CJoystick/Driver/CJoystick.cs index 9437bec..71ee80f 100644 --- a/Source/CJoystick/Driver/CJoystick.cs +++ b/Source/CJoystick/Driver/CJoystick.cs @@ -53,12 +53,11 @@ public TimeSpan LongClickedThreshold /// /// Creates a mikroBUS Joystick Click board instance /// - /// meadow device /// TST pin /// I2C bus - public CJoystick(IMeadowDevice device, IPin tstPin, II2cBus i2cBus) : base(i2cBus, (byte)Addresses.Default) + public CJoystick(IPin tstPin, II2cBus i2cBus) : base(i2cBus, (byte)Addresses.Default) { - button = new PushButton(device, tstPin); + button = new PushButton(tstPin); button.PressStarted += (s, e) => PressStarted?.Invoke(s, e); button.PressEnded += (s, e) => PressEnded?.Invoke(s, e); diff --git a/Source/CJoystick/Sample/CJoystick_Sample/MeadowApp.cs b/Source/CJoystick/Sample/CJoystick_Sample/MeadowApp.cs index 7996361..bd64dd1 100644 --- a/Source/CJoystick/Sample/CJoystick_Sample/MeadowApp.cs +++ b/Source/CJoystick/Sample/CJoystick_Sample/MeadowApp.cs @@ -17,7 +17,7 @@ public MeadowApp() { Console.WriteLine("Initializing ..."); - joystick = new CJoystick(Device, Device.Pins.A02, Device.CreateI2cBus()); + joystick = new CJoystick(Device.Pins.A02, Device.CreateI2cBus()); //loop and read digital position for (int i = 0; i < 100; i++) From 2cf06e8e74cafa033610d9190315d483c383f48e Mon Sep 17 00:00:00 2001 From: Adrian Stevens Date: Sat, 4 Mar 2023 18:41:09 -0800 Subject: [PATCH 5/8] Fix GNSS5 csproj meta data --- Source/CGNSS5/Driver/CGNSS5.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/CGNSS5/Driver/CGNSS5.csproj b/Source/CGNSS5/Driver/CGNSS5.csproj index 49ca318..40dec21 100644 --- a/Source/CGNSS5/Driver/CGNSS5.csproj +++ b/Source/CGNSS5/Driver/CGNSS5.csproj @@ -5,10 +5,10 @@ Wilderness Labs, Inc netstandard2.1 Library - CGNSS% + CGNSS5 Wilderness Labs, Inc http://developer.wildernesslabs.co/Meadow/Meadow.Foundation/ - Meadow.Foundation.mikroBUS.Sensors.Gnss.CGNSS10 + Meadow.Foundation.mikroBUS.Sensors.Gnss.CGNSS5 https://github.com/WildernessLabs/Meadow.Foundation Meadow,Meadow.Foundation,MikroBus,Mikroe,MikroElectronika,GPS,GNSS,Click,5 0.1.0 From eac6eb1c25f67546f748761b791b0add9a6b8e49 Mon Sep 17 00:00:00 2001 From: Adrian Stevens Date: Sat, 4 Mar 2023 18:46:19 -0800 Subject: [PATCH 6/8] Minor GNSS 5 metadata fix --- Source/CGNSS5/Driver/CGNSS5.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/CGNSS5/Driver/CGNSS5.csproj b/Source/CGNSS5/Driver/CGNSS5.csproj index 40dec21..95d927b 100644 --- a/Source/CGNSS5/Driver/CGNSS5.csproj +++ b/Source/CGNSS5/Driver/CGNSS5.csproj @@ -1,4 +1,4 @@ - + true icon.png @@ -13,7 +13,7 @@ Meadow,Meadow.Foundation,MikroBus,Mikroe,MikroElectronika,GPS,GNSS,Click,5 0.1.0 true - MikroElectronika Serial I2C Neo M8 GPS / GNSS MikroBus click board + MikroElectronika Serial I2C Neo M8 GPS / GNSS 5 MikroBus click board From 88559496b97cc2fcf84cb4303c352cc2256b3d8d Mon Sep 17 00:00:00 2001 From: Adrian Stevens Date: Sat, 4 Mar 2023 22:32:13 -0800 Subject: [PATCH 7/8] Update nuget-publish.yml --- .github/workflows/nuget-publish.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nuget-publish.yml b/.github/workflows/nuget-publish.yml index 49a8a32..3b30ef6 100644 --- a/.github/workflows/nuget-publish.yml +++ b/.github/workflows/nuget-publish.yml @@ -59,7 +59,14 @@ jobs: path: Source/CGNSS10/Driver/CGNSS10.csproj version: ${VERSION} token: ${{ env.token }} - + + - uses: ./.github/actions/build-package + with: + packageId: Meadow.Foundation.mikroBUS.Sensors.Gnss.CGNSS5 + path: Source/CGNSS5/Driver/CGNSS5.csproj + version: ${VERSION} + token: ${{ env.token }} + - uses: ./.github/actions/build-package with: packageId: Meadow.Foundation.mikroBUS.Sensors.Atmospheric.CTempHum15 From bf66793d5da82dc82fd887f7b17b35da3205aa93 Mon Sep 17 00:00:00 2001 From: Adrian Stevens Date: Sat, 4 Mar 2023 22:33:27 -0800 Subject: [PATCH 8/8] Nugetize for RC2-2 --- Source/C16x9/Driver/C16x9.csproj | 4 ++-- Source/C16x9/Sample/C16x9G_Sample/C16x9_Sample.csproj | 2 +- Source/C8800Retro/Driver/C8800Retro.csproj | 2 +- .../Sample/C8800Retro_Sample/C8800Retro_Sample.csproj | 4 ++-- Source/C8x8/Driver/C8x8.csproj | 2 +- Source/C8x8/Sample/C8x8_Sample/C8x8_Sample.csproj | 2 +- Source/CButton/Driver/CButton.csproj | 2 +- Source/CButton/Sample/CButton_Sample/CButton_Sample.csproj | 2 +- Source/CGNSS10/Driver/CGNSS10.csproj | 4 ++-- Source/CGNSS10/Sample/CGNSS10_Sample/CGNSS10_Sample.csproj | 2 +- Source/CGNSS5/Driver/CGNSS5.csproj | 2 +- Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj | 2 +- Source/CJoystick/Driver/CJoystick.csproj | 2 +- .../CJoystick/Sample/CJoystick_Sample/CJoystick_Sample.csproj | 2 +- Source/CTempHum15/Driver/CTempHum15.csproj | 2 +- .../Sample/CTempHum15_Sample/CTempHum15_Sample.csproj | 2 +- 16 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Source/C16x9/Driver/C16x9.csproj b/Source/C16x9/Driver/C16x9.csproj index 0bb54bf..90365e9 100644 --- a/Source/C16x9/Driver/C16x9.csproj +++ b/Source/C16x9/Driver/C16x9.csproj @@ -19,7 +19,7 @@ - - + + diff --git a/Source/C16x9/Sample/C16x9G_Sample/C16x9_Sample.csproj b/Source/C16x9/Sample/C16x9G_Sample/C16x9_Sample.csproj index fca2053..7c9fa98 100644 --- a/Source/C16x9/Sample/C16x9G_Sample/C16x9_Sample.csproj +++ b/Source/C16x9/Sample/C16x9G_Sample/C16x9_Sample.csproj @@ -6,7 +6,7 @@ App - + diff --git a/Source/C8800Retro/Driver/C8800Retro.csproj b/Source/C8800Retro/Driver/C8800Retro.csproj index 770b166..b66135e 100644 --- a/Source/C8800Retro/Driver/C8800Retro.csproj +++ b/Source/C8800Retro/Driver/C8800Retro.csproj @@ -19,6 +19,6 @@ - + diff --git a/Source/C8800Retro/Sample/C8800Retro_Sample/C8800Retro_Sample.csproj b/Source/C8800Retro/Sample/C8800Retro_Sample/C8800Retro_Sample.csproj index 2b9b6f8..8687f37 100644 --- a/Source/C8800Retro/Sample/C8800Retro_Sample/C8800Retro_Sample.csproj +++ b/Source/C8800Retro/Sample/C8800Retro_Sample/C8800Retro_Sample.csproj @@ -1,4 +1,4 @@ - + netstandard2.1 true @@ -6,7 +6,7 @@ App - + diff --git a/Source/C8x8/Driver/C8x8.csproj b/Source/C8x8/Driver/C8x8.csproj index be83bbd..e72b5ae 100644 --- a/Source/C8x8/Driver/C8x8.csproj +++ b/Source/C8x8/Driver/C8x8.csproj @@ -19,6 +19,6 @@ - + diff --git a/Source/C8x8/Sample/C8x8_Sample/C8x8_Sample.csproj b/Source/C8x8/Sample/C8x8_Sample/C8x8_Sample.csproj index 4338df5..14f3b11 100644 --- a/Source/C8x8/Sample/C8x8_Sample/C8x8_Sample.csproj +++ b/Source/C8x8/Sample/C8x8_Sample/C8x8_Sample.csproj @@ -6,7 +6,7 @@ App - + diff --git a/Source/CButton/Driver/CButton.csproj b/Source/CButton/Driver/CButton.csproj index 4d1518f..41c0b52 100644 --- a/Source/CButton/Driver/CButton.csproj +++ b/Source/CButton/Driver/CButton.csproj @@ -19,6 +19,6 @@ - + diff --git a/Source/CButton/Sample/CButton_Sample/CButton_Sample.csproj b/Source/CButton/Sample/CButton_Sample/CButton_Sample.csproj index 68e8049..3cd19cf 100644 --- a/Source/CButton/Sample/CButton_Sample/CButton_Sample.csproj +++ b/Source/CButton/Sample/CButton_Sample/CButton_Sample.csproj @@ -6,7 +6,7 @@ App - + diff --git a/Source/CGNSS10/Driver/CGNSS10.csproj b/Source/CGNSS10/Driver/CGNSS10.csproj index 4aa6e25..51d2c90 100644 --- a/Source/CGNSS10/Driver/CGNSS10.csproj +++ b/Source/CGNSS10/Driver/CGNSS10.csproj @@ -1,4 +1,4 @@ - + true icon.png @@ -19,6 +19,6 @@ - + diff --git a/Source/CGNSS10/Sample/CGNSS10_Sample/CGNSS10_Sample.csproj b/Source/CGNSS10/Sample/CGNSS10_Sample/CGNSS10_Sample.csproj index e6f2494..5190e19 100644 --- a/Source/CGNSS10/Sample/CGNSS10_Sample/CGNSS10_Sample.csproj +++ b/Source/CGNSS10/Sample/CGNSS10_Sample/CGNSS10_Sample.csproj @@ -6,7 +6,7 @@ App - + diff --git a/Source/CGNSS5/Driver/CGNSS5.csproj b/Source/CGNSS5/Driver/CGNSS5.csproj index 49ca318..81d4352 100644 --- a/Source/CGNSS5/Driver/CGNSS5.csproj +++ b/Source/CGNSS5/Driver/CGNSS5.csproj @@ -19,6 +19,6 @@ - + diff --git a/Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj b/Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj index 29d9d06..89196fa 100644 --- a/Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj +++ b/Source/CGNSS5/Sample/CGNSS5_Sample/CGNSS5_Sample.csproj @@ -6,7 +6,7 @@ App - + diff --git a/Source/CJoystick/Driver/CJoystick.csproj b/Source/CJoystick/Driver/CJoystick.csproj index 49cb7f4..9fb33fa 100644 --- a/Source/CJoystick/Driver/CJoystick.csproj +++ b/Source/CJoystick/Driver/CJoystick.csproj @@ -19,6 +19,6 @@ - + diff --git a/Source/CJoystick/Sample/CJoystick_Sample/CJoystick_Sample.csproj b/Source/CJoystick/Sample/CJoystick_Sample/CJoystick_Sample.csproj index c502486..4a9d929 100644 --- a/Source/CJoystick/Sample/CJoystick_Sample/CJoystick_Sample.csproj +++ b/Source/CJoystick/Sample/CJoystick_Sample/CJoystick_Sample.csproj @@ -6,7 +6,7 @@ App - + diff --git a/Source/CTempHum15/Driver/CTempHum15.csproj b/Source/CTempHum15/Driver/CTempHum15.csproj index d5f84ef..e1e448a 100644 --- a/Source/CTempHum15/Driver/CTempHum15.csproj +++ b/Source/CTempHum15/Driver/CTempHum15.csproj @@ -19,6 +19,6 @@ - + diff --git a/Source/CTempHum15/Sample/CTempHum15_Sample/CTempHum15_Sample.csproj b/Source/CTempHum15/Sample/CTempHum15_Sample/CTempHum15_Sample.csproj index 6fd945d..46296e5 100644 --- a/Source/CTempHum15/Sample/CTempHum15_Sample/CTempHum15_Sample.csproj +++ b/Source/CTempHum15/Sample/CTempHum15_Sample/CTempHum15_Sample.csproj @@ -6,7 +6,7 @@ App - +