Table of Contents

Class LedTransmitChannel

Namespace
nanoFramework.Hardware.Esp32.Rmt
Assembly
nanoFramework.Hardware.Esp32.Rmt.dll

Class to create RMT TransmitterChannel for led strips.

public class LedTransmitChannel : IDisposable
Inheritance
LedTransmitChannel
Implements
Inherited Members
Extension Methods

Constructors

LedTransmitChannel(int, ushort, ushort, ushort, ushort, ushort)

Create a LedTransmitChannel for use with a led strip with the specified timings.

public LedTransmitChannel(int pinNumber, ushort T0L, ushort T0H, ushort T1L, ushort T1H, ushort ResetTime)

Parameters

pinNumber int

GPIO output pin number.

T0L ushort

Data transfer time in ticks for bit 0 low part (number of 100ns ticks).

T0H ushort

Data transfer time in ticks for bit 0 high part (number of 100ns ticks).

T1L ushort

Data transfer time in ticks for bit 1 low part (number of 100ns ticks).

T1H ushort

Data transfer time in ticks for bit 1 high part (number of 100ns ticks).

ResetTime ushort

Data transfer time in ticks for reset (number of 100ns ticks).

Remarks

Used for creating led strip channels with different timings to standard led strip types. For standard types use LedTransmitChannel(int, LedType)

LedTransmitChannel(int, LedType)

Create a TransmitterChannel for use with specified WS28xx/SK28xx led.

public LedTransmitChannel(int pinNumber, LedType wsType)

Parameters

pinNumber int

GPIO output pin number.

wsType LedType

Type of WS28xx/SK28xx led strip.

Properties

Channel

Return underlying rmt channel. Can be used to pass to TransmitSyncManager to synchronize led channels.

public TransmitterEncodedChannel Channel { get; }

Property Value

TransmitterEncodedChannel

Methods

Dispose()

Dispose

public void Dispose()

Dispose(bool)

Dispose pattern implementation to clean up the TransmitterChannel when done.

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

SendLedData(byte[], int, bool)

Send Led data to the strip. Data should be in correct color format, 3 bytes per led, and in the order of LEDS on the strip.

public void SendLedData(byte[] ledData, int RepeatDataCount = 1, bool waitToComplete = true)

Parameters

ledData byte[]

Array of bytes representing the LED data.

RepeatDataCount int

Number of times to output data. This can be used to set each LED with same info or repeat pattern along whole string.

waitToComplete bool

Wait for the transmission to complete before returning.