Remarks
LineFinder | |
---|---|
Status | |
Source code | GitHub |
NuGet package |
Code Example
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
var lineFinder = new LineFinder(Device.Pins.D13);
lineFinder.ColorChanged += (s, e) =>
{
Resolver.Log.Info($"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 | object > LineFinder |
Inherited Members | object.Equals(object) object.Equals(object, object) object.GetHashCode() object.GetType() object.MemberwiseClone() object.ReferenceEquals(object, object) object.ToString() |
Namespace | Meadow.Foundation.Grove.Sensors.Light |
Assembly | LineFinder.dll |
Syntax
public class LineFinder
Constructors
LineFinder(IDigitalInterruptPort)
Creates a new LineFinder driver
Declaration
public LineFinder(IDigitalInterruptPort signalPort)
Parameters
Type | Name | Description |
---|---|---|
IDigitalInterruptPort | signalPort |
Remarks
LineFinder | |
---|---|
Status | |
Source code | GitHub |
NuGet package |
Code Example
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
var lineFinder = new LineFinder(Device.Pins.D13);
lineFinder.ColorChanged += (s, e) =>
{
Resolver.Log.Info($"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 |
LineFinder(IPin)
Creates a new LineFinder driver
Declaration
public LineFinder(IPin inputPin)
Parameters
Type | Name | Description |
---|---|---|
IPin | inputPin |
Remarks
LineFinder | |
---|---|
Status | |
Source code | GitHub |
NuGet package |
Code Example
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
var lineFinder = new LineFinder(Device.Pins.D13);
lineFinder.ColorChanged += (s, e) =>
{
Resolver.Log.Info($"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 |
Properties
Color
Last state of the Line Finder
Declaration
public LineFinder.LineColor Color { get; }
Property Value
Type | Description |
---|---|
LineFinder.LineColor |
Remarks
LineFinder | |
---|---|
Status | |
Source code | GitHub |
NuGet package |
Code Example
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
var lineFinder = new LineFinder(Device.Pins.D13);
lineFinder.ColorChanged += (s, e) =>
{
Resolver.Log.Info($"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 |
Events
ColorChanged
Event when line color changed
Declaration
public event EventHandler<LineFinder.LineColor> ColorChanged
Event Type
Type | Description |
---|---|
EventHandler<LineFinder.LineColor> |
Remarks
LineFinder | |
---|---|
Status | |
Source code | GitHub |
NuGet package |
Code Example
public override Task Initialize()
{
Resolver.Log.Info("Initialize...");
var lineFinder = new LineFinder(Device.Pins.D13);
lineFinder.ColorChanged += (s, e) =>
{
Resolver.Log.Info($"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 |