Set Intensity

The "set" command can be used to set the intensity.

Prototype:

/** Sets the intensity of a led. If the name matches an * RGB led, all channels are set to the same value. * @param pName The name of the led, RGB led, or group * @param pIntensity The intensity between 0-1 */ void set const std::string& pName, const float& pIntensity );

Python:

# Replace "127.0.0.1" with the IP of your NAO leds = ALProxy("ALLeds","127.0.0.1",9559) # Turn the red LED of the left foot half on leds.setIntensity("LFoot/Led/Red/Actuator/Value",0.5) # Turn the green face LEDs half on leds.setIntensity("FaceLedsGreen",0.5)

C++:

ALPtr<ALLedsProxy> leds = ALPtr<ALLedsProxy>(new ALLedsProxy(getParentBroker())); // Turn the red LED of the left foot half on leds->setIntensity("LFoot/Led/Red/Actuator/Value",0.5f); // Turn the green face LEDs half on leds->setIntensity("FaceLedsGreen",0.5f);





Copyright © 2010 Aldebaran-Robotics - All rights reserved