This repository was archived by the owner on Feb 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Python 3
Max Narvaez edited this page Jan 18, 2020
·
3 revisions
An AnimationSender is constructed with two arguments:
-
ip_address: The IP address of the server (as a string) -
port_num: The port that the client should connect to (as an integer)
sender = AnimationSender("10.0.0.254", 5)An AnimationSender is started by calling the start() method on the instance.
sender.start()To stop the AnimationSender, call its end() method.
sender.end()An animation can be sent to the server by creating an instance of the AnimationData class, then calling send_animation() with the instance as the argument.
color = ColorContainer()
color.add_color(0xFF)
color.add_color(0xFF00)
data = AnimationData()
data.add_color(color)
sender.send_animation(data)The Python library uses the following values for animation, continuous and direction:
-
animation:Animation.COLOR,Animation.ALTERNATE,Animation.RIPPLE, etc. -
continuous:None,True,False -
direction:Direction.FORWARD,Direction.BACKWARD
Currently the Python library only supports sending data.