MBLLED Class Reference

Inherits from MBLModule : NSObject
Declared in MBLLED.h

Overview

Interface to on-board LED

– setLEDColorAsync:withIntensity:

Display a specific color on the LED

- (BFTask *)setLEDColorAsync:(MBLColor *)color withIntensity:(CGFloat)intensity

Parameters

color

Which color the LED should be

intensity

Scale from 0-1.0 on how bright the LED should be

Declared In

MBLLED.h

– flashLEDColorAsync:withIntensity:

Flash a specific color on the LED

- (BFTask *)flashLEDColorAsync:(MBLColor *)color withIntensity:(CGFloat)intensity

Parameters

color

Which color the LED should flash

intensity

Scale from 0-1.0 on how bright the LED should be

Declared In

MBLLED.h

– flashLEDColorAsync:withIntensity:numberOfFlashes:

Flash a specific color on the LED

- (BFTask *)flashLEDColorAsync:(MBLColor *)color withIntensity:(CGFloat)intensity numberOfFlashes:(uint8_t)numberOfFlashes

Parameters

color

Which color the LED should flash

intensity

Scale from 0-1.0 on how bright the LED should be

numberOfFlashes

Number of times LED will flash before turning off

Declared In

MBLLED.h

– flashLEDColorAsync:withIntensity:onTime:andPeriod:

Flash a specific color on the LED

- (BFTask *)flashLEDColorAsync:(MBLColor *)color withIntensity:(CGFloat)intensity onTime:(uint16_t)otime andPeriod:(uint16_t)period

Parameters

color

Which color the LED should flash

intensity

Scale from 0-1.0 on how bright the LED should be

otime

Time in mSec LED spends on

period

Flash period lenght in mSec

Declared In

MBLLED.h

– flashLEDColorAsync:withIntensity:onTime:period:numberOfFlashes:

Flash a specific color on the LED

- (BFTask *)flashLEDColorAsync:(MBLColor *)color withIntensity:(CGFloat)intensity onTime:(uint16_t)otime period:(uint16_t)period numberOfFlashes:(uint8_t)numberOfFlashes

Parameters

color

Which color the LED should flash

intensity

Scale from 0-1.0 on how bright the LED should be

otime

Time in mSec LED spends on

period

Flash period lenght in mSec

numberOfFlashes

Number of times LED will flash before turning off

Declared In

MBLLED.h

– setLEDModeWithColorChannelAsync:onIntensity:offIntensity:riseTime:fallTime:onTime:period:offset:repeatCount:

Program one color channel of the LED, there are 3 total (red, blue, green). Each one is programmed individually and then the whole LED is enabled by a called to setLEDOn:withOptions:

- (BFTask *)setLEDModeWithColorChannelAsync:(MBLLEDColorChannel)channel onIntensity:(uint8_t)onint offIntensity:(uint8_t)ofint riseTime:(uint16_t)rtime fallTime:(uint16_t)ftime onTime:(uint16_t)otime period:(uint16_t)period offset:(uint16_t)offset repeatCount:(uint8_t)repeat

Parameters

channel

Color channel being configured

onint

ON Intensity (0-31)

ofint

OFF Intensity (0-31)

rtime

Time Rise (used for Flash mode only)

ftime

Time Fall (used for Flash mode only)

otime

Time On

period

Time Period

offset

Time Offset

repeat

Repeat Count (0-254, 255: Forever)

Declared In

MBLLED.h

– setLEDOnAsync:withOptions:

Change global LED state.

- (BFTask *)setLEDOnAsync:(BOOL)on withOptions:(uint8_t)mode

Parameters

on

YES turns LED on, NO, turns LED off

mode

If on == YES then (0: pause, 1: play), if on == NO then (0: Stop, 1: Stop and reset channels)

Declared In

MBLLED.h

– writeSecondaryMode:

Certain hardware has additional modes for advanced features

- (BFTask *)writeSecondaryMode:(NSData *)data

Parameters

data

Bytes to write to the secondary mode register

Declared In

MBLLED.h