MetaWear C# SDK  1.2.0
C# API for MbientLab's sensor platform
Public Member Functions | Properties | List of all members
MbientLab.MetaWear.Peripheral.NeoPixel.IStrand Interface Reference

Represents a NeoPixel strand More...

Public Member Functions

void Free ()
 Free resources allocated by the firmware for this strand. After calling free, this object is no longer valid and should be discarded More...
 
void Hold ()
 Enables strand holding. When enabled, the strand will not refresh with any LED changes until the hold is disabled.This allows you to form complex LED patterns without having the strand refresh with partial changes. More...
 
void Release ()
 Disables strand holding. The strand will be refreshed with any LED changes programmed while the hold was active. More...
 
void Clear (byte start, byte end)
 Clears the LEDs in the given range More...
 
void SetRgb (byte index, byte red, byte green, byte blue)
 Set and LED's rgb values More...
 
void Rotate (RotationDirection direction, ushort period, byte repetitions=0xff)
 Rotate the LED color patterns on a strand More...
 
void StopRotation ()
 Stops the LED rotation More...
 

Properties

int NLeds [get]
 Number of LEDs initialized for the strand More...
 

Detailed Description

Represents a NeoPixel strand

Member Function Documentation

◆ Clear()

void MbientLab.MetaWear.Peripheral.NeoPixel.IStrand.Clear ( byte  start,
byte  end 
)

Clears the LEDs in the given range

Parameters
startLed index to start clearing from
endLed index to clear to, exclusive

◆ Free()

void MbientLab.MetaWear.Peripheral.NeoPixel.IStrand.Free ( )

Free resources allocated by the firmware for this strand. After calling free, this object is no longer valid and should be discarded

◆ Hold()

void MbientLab.MetaWear.Peripheral.NeoPixel.IStrand.Hold ( )

Enables strand holding. When enabled, the strand will not refresh with any LED changes until the hold is disabled.This allows you to form complex LED patterns without having the strand refresh with partial changes.

◆ Release()

void MbientLab.MetaWear.Peripheral.NeoPixel.IStrand.Release ( )

Disables strand holding. The strand will be refreshed with any LED changes programmed while the hold was active.

◆ Rotate()

void MbientLab.MetaWear.Peripheral.NeoPixel.IStrand.Rotate ( RotationDirection  direction,
ushort  period,
byte  repetitions = 0xff 
)

Rotate the LED color patterns on a strand

Parameters
directionRotation direction
periodAmount of time, in milliseconds (ms), between rotations
repetitionsNumber of times to repeat the rotation, defaults to indefinite

◆ SetRgb()

void MbientLab.MetaWear.Peripheral.NeoPixel.IStrand.SetRgb ( byte  index,
byte  red,
byte  green,
byte  blue 
)

Set and LED's rgb values

Parameters
indexLED index to set, from [0, nLeds - 1]
redRed value, between [0, 255]
greenGreen value, between [0, 255]
blueBlue value, between [0, 255]

◆ StopRotation()

void MbientLab.MetaWear.Peripheral.NeoPixel.IStrand.StopRotation ( )

Stops the LED rotation

Property Documentation

◆ NLeds

int MbientLab.MetaWear.Peripheral.NeoPixel.IStrand.NLeds
get

Number of LEDs initialized for the strand


The documentation for this interface was generated from the following file: