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
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 42ed4ad..8687f37 100644
--- a/Source/C8800Retro/Sample/C8800Retro_Sample/C8800Retro_Sample.csproj
+++ b/Source/C8800Retro/Sample/C8800Retro_Sample/C8800Retro_Sample.csproj
@@ -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
new file mode 100644
index 0000000..f85cbaa
--- /dev/null
+++ b/Source/CGNSS5/Driver/CGNSS5.cs
@@ -0,0 +1,25 @@
+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 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(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/Driver/CGNSS5.csproj b/Source/CGNSS5/Driver/CGNSS5.csproj
new file mode 100644
index 0000000..071225e
--- /dev/null
+++ b/Source/CGNSS5/Driver/CGNSS5.csproj
@@ -0,0 +1,24 @@
+
+
+ true
+ icon.png
+ Wilderness Labs, Inc
+ netstandard2.1
+ Library
+ CGNSS5
+ Wilderness Labs, Inc
+ http://developer.wildernesslabs.co/Meadow/Meadow.Foundation/
+ 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
+ true
+ MikroElectronika Serial I2C Neo M8 GPS / GNSS 5 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..504c7be
--- /dev/null
+++ b/Source/CGNSS5/Sample/CGNSS5_Sample/MeadowApp.cs
@@ -0,0 +1,79 @@
+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.PlatformOS.GetSerialPortName("COM1"), Device.Pins.D09, Device.Pins.D11);
+
+ gps = new CGNSS5(Device.CreateI2cBus(), resetPin: Device.Pins.D09, ppsPin: 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/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++)
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}