picofuse-objc

NXLight.h
Go to the documentation of this file.
1 
5 #pragma once
7 
40 @interface NXLight : NXObject {
41 @private
42  void *_led;
43  void *_gpio[3];
44  void *_pwm[3];
45  id _owner;
46  uint8_t _count;
47 }
48 
57 + (NXLight *)default;
58 
63 + (NXLight *)binaryWithPin:(uint8_t)pin;
64 
69 + (NXLight *)pwmWithPin:(uint8_t)pin;
70 
82 + (NXLight *)rgbWithRedPin:(uint8_t)red
83  greenPin:(uint8_t)green
84  bluePin:(uint8_t)blue
85  inverted:(BOOL)inverted;
86 
94 + (NXLight *)neopixelWithPin:(uint8_t)pin count:(uint8_t)count;
95 
102 + (NXLight *)deviceWithName:(NXString *)name;
103 
107 - (size_t)count;
108 
112 - (void)setBoolValue:(BOOL)value;
113 
117 - (void)setBoolValue:(BOOL)value atIndex:(size_t)index;
118 
123 - (void)setBrightness:(float)brightness;
124 
128 - (void)setBrightness:(float)brightness atIndex:(size_t)index;
129 
134 - (void)setColor:(NXColor *)color;
135 
139 - (void)setColor:(NXColor *)color atIndex:(size_t)index;
140 
148 - (BOOL)blinkWithInterval:(NXDuration)interval repeats:(BOOL)repeats;
149 
154 - (BOOL)blinkWithInterval:(NXDuration)interval repeats:(BOOL)repeats atIndex:(size_t)index;
155 
159 - (void)clear;
160 
161 @end
An LED, or a chain of NeoPixels, which is turned on and off, dimmed, colored, or blinked.
Definition: NXLight.h:40
int64_t NXDuration
A length of time, in nanoseconds, which may be negative.
Definition: NXDuration.h:17
Foundation framework header.
bool BOOL
A Boolean value.
Definition: runtime.h:60
const char * name()
Returns the name of the class.
A string of UTF-8 text.
Definition: NXString.h:53
void clear()
Turns it off, or every LED of a chain, and stops a blink.
The base class for objects in the Foundation framework.
Definition: NXObject.h:28
A color: red, green and blue, with an opacity.
Definition: NXColor.h:27
size_t count()
Returns the number of LEDs, which is more than 1 for a chain of NeoPixels.