Remarks

NeoM8
Status Status badge: working
Source code GitHub
Datasheet(s) GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Sensors.Gnss.NeoM8

Code Example

NeoM8 gps;

public override Task Initialize()
{
    Resolver.Log.Info("Initializing ...");

    //SPI
    //gps = new NeoM8(Device.CreateSpiBus(), Device.CreateDigitalOutputPort(Device.Pins.D14), null);

    //I2C
    //gps = new NeoM8(Device.CreateI2cBus());

    //Serial
    gps = new NeoM8(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;
}

Sample project(s) available on GitHub

Characteristic Locus
Inheritance System.Object > NeoM8
Namespace Meadow.Foundation.Sensors.Gnss
Assembly NeoM8.dll

Syntax

public class NeoM8 : object

Constructors

NeoM8(II2cBus, Byte, IDigitalOutputPort, IDigitalInputPort)

Create a new NeoM8 object using I2C

Declaration
public NeoM8(II2cBus i2cBus, byte address = null, IDigitalOutputPort resetPort = null, IDigitalInputPort ppsPort = null)

Parameters

Type Name Description
II2cBus i2cBus
System.Byte address
IDigitalOutputPort resetPort
IDigitalInputPort ppsPort

NeoM8(II2cBus, Byte, IPin, IPin)

Create a new NeoM8 object using I2C

Declaration
public NeoM8(II2cBus i2cBus, byte address = null, IPin resetPin = null, IPin ppsPin = null)

Parameters

Type Name Description
II2cBus i2cBus
System.Byte address
IPin resetPin
IPin ppsPin

NeoM8(IMeadowDevice, SerialPortName, IPin, IPin)

Create a new NEOM8 object

Declaration
public NeoM8(IMeadowDevice device, SerialPortName serialPortName, IPin resetPin, IPin ppsPin = null)

Parameters

Type Name Description
IMeadowDevice device

IMeadowDevice instance

SerialPortName serialPortName

The serial port name to create

IPin resetPin

The reset pin

IPin ppsPin

The pulse per second pin

NeoM8(ISerialMessagePort, IDigitalOutputPort, IDigitalInputPort)

Create a new NEOM8 object

Declaration
protected NeoM8(ISerialMessagePort serialPort, IDigitalOutputPort resetPort = null, IDigitalInputPort ppsPort = null)

Parameters

Type Name Description
ISerialMessagePort serialPort
IDigitalOutputPort resetPort
IDigitalInputPort ppsPort

NeoM8(ISpiBus, IDigitalOutputPort, IDigitalOutputPort, IDigitalInputPort)

Create a new NEOM8 object using SPI

Declaration
public NeoM8(ISpiBus spiBus, IDigitalOutputPort chipSelectPort, IDigitalOutputPort resetPort = null, IDigitalInputPort ppsPort = null)

Parameters

Type Name Description
ISpiBus spiBus
IDigitalOutputPort chipSelectPort
IDigitalOutputPort resetPort
IDigitalInputPort ppsPort

NeoM8(ISpiBus, IPin, IPin, IPin)

Create a new NeoM8 object using SPI

Declaration
public NeoM8(ISpiBus spiBus, IPin chipSelectPin = null, IPin resetPin = null, IPin ppsPin = null)

Parameters

Type Name Description
ISpiBus spiBus
IPin chipSelectPin
IPin resetPin
IPin ppsPin

Properties

PulsePerSecondPort

NeoM8 pulse per second port

Declaration
public IDigitalInputPort PulsePerSecondPort { get; }

Property Value

Type Description
IDigitalInputPort

ResetPort

NeoM8 reset port Initialize high to enable the device

Declaration
protected IDigitalOutputPort ResetPort { get; }

Property Value

Type Description
IDigitalOutputPort

Methods

Reset()

Reset the device

Declaration
public Task Reset()

Returns

Type Description
Task

StartUpdating()

Start updating

Declaration
public void StartUpdating()

Events

GgaReceived

Raised when GGA position data is received

Declaration
public event EventHandler<GnssPositionInfo> GgaReceived

Event Type

Type Description
EventHandler<GnssPositionInfo>

GllReceived

Raised when GLL position data is received

Declaration
public event EventHandler<GnssPositionInfo> GllReceived

Event Type

Type Description
EventHandler<GnssPositionInfo>

GsaReceived

Raised when GSA satellite data is received

Declaration
public event EventHandler<ActiveSatellites> GsaReceived

Event Type

Type Description
EventHandler<ActiveSatellites>

GsvReceived

Raised when GSV satellite data is received

Declaration
public event EventHandler<SatellitesInView> GsvReceived

Event Type

Type Description
EventHandler<SatellitesInView>

RmcReceived

Raised when RMC position data is received

Declaration
public event EventHandler<GnssPositionInfo> RmcReceived

Event Type

Type Description
EventHandler<GnssPositionInfo>

VtgReceived

Raised when VTG course over ground data is received

Declaration
public event EventHandler<CourseOverGround> VtgReceived

Event Type

Type Description
EventHandler<CourseOverGround>