animation()
- 1 Minute to read
animation()
- 1 Minute to read
Article summary
Did you find this summary helpful?
Thank you for your feedback
A method that will play a specified animation on the specified group.
Reference
Arguments
Arguments | Type | Default value | Explenation |
---|---|---|---|
group | string | name of the predefined led's group | |
color | string | name of the predefined led's color | |
animation | string | name of the predefined led's animation you want to play | |
speed | int | 1 | sets the speed that the animation will play, 0 is not allowd |
repetitions | int | 1 | number of the times the animation will play. if set 0 - the animation will play forever |
Exceptions
Exception | Condition |
---|---|
RayaBridgeException | Command was not accepted properly |
See the complete list of Raya Exceptions.
Example
Give an order for UR robot to play an animation on the head led, with the color red, at the default speed of 1, and do it once.
leds.animation(group = 'head', color= 'red', animation= 'waiting', speed=1, repetitions= 1)
Notice:
If no speed was specified, the default speed would be 1.
setting repetitions = 0 will make the robot play the animation indefinitely
Was this article helpful?