#import <Application/Application.h>


Instance Methods | |
| (BOOL) | - setState: |
| Set the LED on/off state. More... | |
| (BOOL) | - setBrightness: |
| Set LED brightness (linear scale). More... | |
| (BOOL) | - blinkWithDuration:repeats: |
| Blink the LED at a fixed duty cycle. More... | |
| (BOOL) | - fadeWithDuration:repeats: |
| Fade the LED brightness up/down. More... | |
Instance Methods inherited from NXObject | |
| (id) | - retain |
| Increases the retain count of the receiver. More... | |
| (void) | - release |
| Decreases the retain count of the receiver. More... | |
| (id) | - autorelease |
| Adds the receiver to the autorelease pool. | |
Instance Methods inherited from Object | |
| (void) | - dealloc |
| Free resources for an existing instance. | |
| (id) | - init |
| Initialize the instance, after allocation. More... | |
| (Class) | - class |
| Returns the class of the instance. More... | |
| (Class) | - superclass |
| Returns the superclass of the instance. More... | |
| (BOOL) | - isEqual: |
| Compares the receiver to another object for equality. More... | |
| (BOOL) | - isKindOfClass: |
| Returns a Boolean value that indicates whether the receiver is an instance of a given class. More... | |
| (BOOL) | - conformsTo: |
| Checks if the receiver's class conforms to a protocol. More... | |
| (NXString *) | - description |
| Returns a string that represents the instance. More... | |
Instance Methods inherited from <ObjectProtocol> | |
| (BOOL) | - respondsToSelector: |
| Checks if the receiver responds to a selector. More... | |
Class Methods | |
| (LED *) | + status |
| Returns the on-board status LED. More... | |
| (LED *) | + binaryOnPin: |
| Create or return a binary (on/off) LED on a GPIO pin. More... | |
| (LED *) | + linearOnPin: |
| Create or return a linear-brightness LED on a GPIO/PWM-capable pin. More... | |
Class Methods inherited from NXObject | |
| (id) | + allocWithZone: |
| Allocates a new instance of an object in a specific memory zone. More... | |
Class Methods inherited from Object | |
| (void) | + initialize |
| Performs one-time initialization for the class. More... | |
| (id) | + alloc |
| Allocate a new class instance. More... | |
| (Class) | + class |
| Returns the class object. More... | |
| (Class) | + superclass |
| Returns the superclass of the class. More... | |
| (const char *) | + name |
| Returns the name of the class. More... | |
| (BOOL) | + conformsTo: |
| Checks if the class conforms to a protocol. More... | |
| (NXString *) | + description |
| Returns a string that represents the class. More... | |
Additional Inherited Members | |
Protected Attributes inherited from NXObject | |
| id | _zone |
| The memory zone where the object is allocated. | |
| unsigned short | _retain |
| The retain count of the object. | |
| id | _next |
| The next object in an autorelease pool. | |
Protected Attributes inherited from Object | |
| Class | isa |
| A pointer to the object's class structure. More... | |
The LED class.
LED represents a class for changing Light Emitting Diode (LED) state. You can create a LED instance to control the state (on/off) and brightness of the LED, depending on the hardware capabilities.
LEDs can either be the on-board status LED or external LEDs connected to GPIO pins, and can either be configured as binary (on/off) or support varying linear brightness levels, using PWM (Pulse Width Modulation) for finer control.
| + (LED *) binaryOnPin: | (uint8_t) | pin |
| - (BOOL) blinkWithDuration: | (NXTimeInterval) | duration | |
| repeats: | (BOOL) | repeats | |
Blink the LED at a fixed duty cycle.
| duration | Period in seconds for a full on/off cycle. |
| repeats | YES to continue blinking until stopped; NO for one cycle. |
| - (BOOL) fadeWithDuration: | (NXTimeInterval) | duration | |
| repeats: | (BOOL) | repeats | |
Fade the LED brightness up/down.
| duration | Duration in seconds for a full fade in/out cycle. |
| repeats | YES to continue fading until stopped; NO for one cycle. |
| + (LED *) linearOnPin: | (uint8_t) | pin |
| - (BOOL) setBrightness: | (uint8_t) | brightness |
Set the LED on/off state.
| on | YES to turn on, NO to turn off. |
| + (LED *) status |