ALLeds contains helper methods for controlling the Light Emiting Devices (LEDs).
void createGroup (const string& groupName, const vector<string>& ledNames)
Makes a group name for ease of setting multiple LEDs.
The name of the group.
A vector of the names of the LEDs in the group.
void earLedsSetAngle (const int& degrees, const float& duration, const bool& leaveOnAtEnd)
An animation to show a direction with the ears.
The angle you want to show in degrees (int). 0 is up, 90 is forwards, 180 is down and 270 is back.
The duration in seconds of the animation.
If true the last led is left on at the end of the animation.
void fade (const string& name, const float& intensity, const float& duration)
Sets the intensity of a LED or Group of LEDs within a given time.
The name of the LED or Group.
The intensity of the LED or Group (a value between 0 and 1).
The duration of the fade in seconds
Example in python :
# Example showing how to fade the left eye group to mid-intensity name = 'LeftEye' intensity = 0.5 duration = 1.0 proxy.fade(name, intensity, duration)
Example in c++ :
// Example showing how to fade the left eye group to mid-intensity std::string name = 'LeftEye'; float intensity = 0.5f; float duration = 1.0f; proxy.fade(name, intensity, duration);
void fadeListRGB (const string& name, const AL::ALValue& rgbList, const AL::ALValue& timeList)
Chain a list of color for a device, as the motion.doMove command.
The name of the LED or Group.
List of RGB led value, RGB as seen in hexa-decimal: 0x00RRGGBB.
List of time to go to given intensity.
void fadeRGB (const string& name, const int& rgb, const float& duration)
Sets the intensity of a led. If the name matches an RGB led, all channels are set to the same value.
The name of the LED or Group.
The RGB value led, RGB as seen in hexa-decimal: 0x00RRGGBB.
Time used to fade in seconds.
AL::ALValue getIntensity (const string& name)
Gets the intensity of a LED or device
The name of the LED or Group.
The intensity of the LED or Group.
vector<string> listLED (const string& arg1)
Lists the devices aliased by a short LED name.
arg
A vector of device names.
vector<string> listGroup (const string& groupName)
Lists the devices in the group.
The name of the Group.
A vector of string device names.
Example in python :
# Example showing how print a list of the LEDs in a group groupName = 'AllLeds' result = proxy.listGroup(groupName) print ' '.join(result)
Example in c++ :
// Example showing how to get a list of all the LEDs in a group std::string groupName = 'AllLeds'; std::vector<std::string> result = proxy.listGroup(groupName);
vector<string> listGroups ()
Lists available group names.
A vector of group names.
Example in python :
# Example showing how to print all groups result = proxy.listGroups() print ' '.join(result)
Example in c++ :
// Example showing how to get a list of all groups std::vector<std::string> result = proxy.listGroups();
void off (const string& name)
Switch to a minimum intensity a LED or Group of LEDs.
The name of the LED or Group.
Example in python :
# Example showing how to switch off a group name = 'FaceLeds' proxy.off(name)
Example in c++ :
// Example showing how to switch off a group std::string name = 'FaceLeds'; proxy.off(name);
void on (const string& name)
Switch to a maximum intensity a LED or Group of LEDs.
The name of the LED or Group.
Example in python :
# Example showing how to switch on a group name = 'FaceLeds' proxy.on(name)
Example in c++ :
// Example showing how to switch on a group std::string name = 'FaceLeds'; proxy.on(name);
void rasta (const float& duration)
Launch a green/yellow/red rasta animation on all body.
Approximate duration of the animation in seconds.
Example in python :
# Example showing a one second rasta animation duration = 1.0 proxy.rasta(duration)
Example in c++ :
// Example showing a one second rasta animation float duration = 1.0f; proxy.rasta(duration);
void rotateEyes (const int& rgb, const float& timeForRotation, const float& totalDuration)
Launch a rotation using the leds of the eyes.
the RGB value led, RGB as seen in hexa-decimal: 0x00RRGGBB.
Approximate time to make one turn.
Approximate duration of the animation in seconds.
void randomEyes (const float& duration)
Launch a random animation in eyes
Approximate duration of the animation in seconds.
void setIntensity (const string& name, const float& intensity)
Sets the intensity of a LED or Group of LEDs.
The name of the LED or Group.
The intensity of the LED or Group (a value between 0 and 1).
string version ()
Returns the version of the module.
A string containing the version of the module.
AL::ALValue getMethodHelp (const string& methodName)
Retrieves a method's description.
The name of the method.
A structure containing the method's description.
AL::ALValue getModuleHelp ()
Retrieves the module's description.
A structure describing the module.
string getUsage (const string& name)
Gets the method usage string. This summarise how to use the method.
The name of the method.
A string that summarises the usage of the method.