From 82e2ceb841c6811978d4f0a529c8073254a0f8b8 Mon Sep 17 00:00:00 2001 From: sqozz Date: Fri, 1 Mar 2024 16:33:15 +0100 Subject: [PATCH] Add example.py --- example.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 example.py diff --git a/example.py b/example.py new file mode 100644 index 0000000..90ef387 --- /dev/null +++ b/example.py @@ -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 +