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

Ultra bright RGB light emitting diode More...

Inheritance diagram for MbientLab.MetaWear.Peripheral.ILed:
MbientLab.MetaWear.IModule

Public Member Functions

void EditPattern (Color color, byte high=0, byte low=0, ushort riseTime=0, ushort highTime=0, ushort fallTime=0, ushort duration=0, ushort delay=0, byte count=0xff)
 Edit the pattern attributes for the desired color. All parameters except the color are optional and if not set, will default to 0 except the count parameter which defaults an indefinite count. More...
 
void EditPattern (Color color, Pattern pattern, ushort delay=0, byte count=0xff)
 Apply a preset pattern to the desired color More...
 
void AutoPlay ()
 Play any programmed patterns and immediately plays patterns programmed later More...
 
void Play ()
 Play any programmed patterns More...
 
void Pause ()
 Pause the pattern playback More...
 
void Stop (bool clear)
 Stop playing LED patterns More...
 

Detailed Description

Ultra bright RGB light emitting diode

Member Function Documentation

◆ AutoPlay()

void MbientLab.MetaWear.Peripheral.ILed.AutoPlay ( )

Play any programmed patterns and immediately plays patterns programmed later

◆ EditPattern() [1/2]

void MbientLab.MetaWear.Peripheral.ILed.EditPattern ( Color  color,
byte  high = 0,
byte  low = 0,
ushort  riseTime = 0,
ushort  highTime = 0,
ushort  fallTime = 0,
ushort  duration = 0,
ushort  delay = 0,
byte  count = 0xff 
)

Edit the pattern attributes for the desired color. All parameters except the color are optional and if not set, will default to 0 except the count parameter which defaults an indefinite count.

Parameters
colorColor to configure
highIntensity value of the high state
lowIntensity value of the low state
riseTimeTransition time from low to high state, in milliseconds (ms)
highTimeHow long the pulse stays in the high state, in milliseconds (ms)
fallTimeTransition time from high to low state, in milliseconds (ms)
durationLength of one pulse, in milliseconds (ms)
delayHow long to wait before starting the pattern, in milliseconds (ms), ignored on boards running firmware older than v1.2.3
countHow many times to repeat a pulse pattern

◆ EditPattern() [2/2]

void MbientLab.MetaWear.Peripheral.ILed.EditPattern ( Color  color,
Pattern  pattern,
ushort  delay = 0,
byte  count = 0xff 
)

Apply a preset pattern to the desired color

Parameters
colorColor to configure
patternPreconfigured preset to use
delaySet how long to wait before starting the pattern, defaults to 0. This setting is ignored on boards running firmware older than v1.2.3
countSet how many times to repeat a pulse pattern, defaults to indefinite

◆ Pause()

void MbientLab.MetaWear.Peripheral.ILed.Pause ( )

Pause the pattern playback

◆ Play()

void MbientLab.MetaWear.Peripheral.ILed.Play ( )

Play any programmed patterns

◆ Stop()

void MbientLab.MetaWear.Peripheral.ILed.Stop ( bool  clear)

Stop playing LED patterns

Parameters
clearTrue if the patterns should be cleared as well

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