Remarks
Pca9685 | |
---|---|
Status | |
Source code | GitHub |
NuGet package |
Code Example
public class MeadowApp : App<F7Micro, MeadowApp>
{
Apa102 apa102;
public MeadowApp()
{
Initialize();
Run();
}
void Initialize()
{
Console.WriteLine("Initialize hardware...");
ISpiBus spiBus = Device.CreateSpiBus();
//Not used but is need to create the SPI Peripheral
IDigitalOutputPort spiPeriphChipSelect = Device.CreateDigitalOutputPort(Device.Pins.D04);
apa102 = new Apa102(spiBus, spiPeriphChipSelect, 10, Apa102.PixelOrder.BGR);
}
void Run()
{
Console.WriteLine("Run...");
apa102.Clear();
apa102.Show();
Thread.Sleep(2000);
apa102.SetLed(0, Color.Red, 0.5f);
apa102.SetLed(1, Color.White);
apa102.SetLed(2, Color.Blue);
Thread.Sleep(2000);
apa102.Show();
Thread.Sleep(2000);
apa102.AutoWrite = true;
apa102.SetLed(0, Color.Green);
apa102.SetLed(1, Color.Yellow);
apa102.SetLed(2, Color.Pink);
Thread.Sleep(5000);
apa102.Clear();
}
}
Characteristic | Locus |
---|---|
Inheritance | System.Object > Mt3339 > GPSWing |
Inherited Members | System.Object.ToString() System.Object.Equals(System.Object) System.Object.Equals(System.Object, System.Object) System.Object.ReferenceEquals(System.Object, System.Object) System.Object.GetHashCode() System.Object.GetType() System.Object.MemberwiseClone() |
Namespace | Sensors.Location.MediaTek |
Assembly | Mt3339.dll |
Syntax
public class Mt3339
Constructors
Mt3339(IIODevice, SerialPortName)
Declaration
public Mt3339(IIODevice device, SerialPortName serialPortName)
Parameters
Type | Name | Description |
---|---|---|
IIODevice | device | |
SerialPortName | serialPortName |
Mt3339(ISerialMessagePort)
Declaration
protected Mt3339(ISerialMessagePort serialPort)
Parameters
Type | Name | Description |
---|---|---|
ISerialMessagePort | serialPort |
Methods
Init()
Declaration
protected void Init()
InitDecoders()
Declaration
protected void InitDecoders()
StartUpdating()
Declaration
public void StartUpdating()
Events
GgaReceived
Declaration
public event EventHandler<GnssPositionInfo> GgaReceived
Event Type
Type | Description |
---|---|
System.EventHandler<GnssPositionInfo> |
GllReceived
Declaration
public event EventHandler<GnssPositionInfo> GllReceived
Event Type
Type | Description |
---|---|
System.EventHandler<GnssPositionInfo> |
GsaReceived
Declaration
public event EventHandler<ActiveSatellites> GsaReceived
Event Type
Type | Description |
---|---|
System.EventHandler<ActiveSatellites> |
GsvReceived
Declaration
public event EventHandler<SatellitesInView> GsvReceived
Event Type
Type | Description |
---|---|
System.EventHandler<SatellitesInView> |
RmcReceived
Declaration
public event EventHandler<GnssPositionInfo> RmcReceived
Event Type
Type | Description |
---|---|
System.EventHandler<GnssPositionInfo> |
VtgReceived
Declaration
public event EventHandler<CourseOverGround> VtgReceived
Event Type
Type | Description |
---|---|
System.EventHandler<CourseOverGround> |