Remarks

LineFinder
Status Status badge: working
Source code GitHub
NuGet package NuGet Gallery for Meadow.Foundation.Grove.Sensors.Light.LineFinder

Code Example

public override Task Initialize()
{
    Console.WriteLine("Initialize...");

    var lineFinder = new LineFinder(Device.Pins.D13);

    lineFinder.ColorChanged += (s, e) =>
    {
        Console.WriteLine($"line color: {e}");
    };

    return Task.CompletedTask;
}

Sample project(s) available on GitHub

Wiring Example

LineFinder Meadow Pin
GND GND
VCC 3.3V
RX D01
TX D00
Characteristic Locus
Inheritance System.Object > LineFinder
Namespace Meadow.Foundation.Grove.Sensors.Light
Assembly LineFinder.dll

Syntax

public class LineFinder : object

Constructors

LineFinder(IDigitalInputPort)

Creates a new LineFinder driver

Declaration
public LineFinder(IDigitalInputPort signalPort)

Parameters

Type Name Description
IDigitalInputPort signalPort

LineFinder(IPin)

Creates a new LineFinder driver

Declaration
public LineFinder(IPin inputPin)

Parameters

Type Name Description
IPin inputPin

Properties

Color

Last state of the Line Finder

Declaration
public LineFinder.LineColor Color { get; }

Property Value

Type Description
LineFinder.LineColor

Events

ColorChanged

Event when line color changed

Declaration
public event EventHandler<LineFinder.LineColor> ColorChanged

Event Type

Type Description
EventHandler<LineFinder.LineColor>