Add example.py
This commit is contained in:
parent
2568658ac3
commit
82e2ceb841
14
example.py
Normal file
14
example.py
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import vu1
|
||||||
|
|
||||||
|
API = vu1.DialServer("http://localhost:5340", "my_secret_api_key")
|
||||||
|
dials = API.dials
|
||||||
|
|
||||||
|
# set image and value of specific dial by uid
|
||||||
|
dial = dials[dials.index("my_dial_uid")]
|
||||||
|
dial.image = "image_pack/gpu-load.png"
|
||||||
|
dial.value = 50
|
||||||
|
|
||||||
|
# set backlight to white on all available dials
|
||||||
|
for dial in dials:
|
||||||
|
dial.color = vu1.Color(100, 100, 100) #full white
|
||||||
|
|
Loading…
Reference in a new issue