-
Notifications
You must be signed in to change notification settings - Fork 3
Advanced
Amy edited this page Dec 3, 2023
·
1 revision
If you haven't checked out Getting Started yet, look there first before coming to this section.
Your TreeController
tracks the state of the LEDs on the tree, which you can see by:
print(tree.leds)
There isn't a consistent number of LEDs on the tree; it's all down to how many lights are on the tree. The positions also aren't constant, because the physical world isn't that nice.
You can set the tree to whatever the current state of the LED list is:
await tree.update_manual()
On it's own, however, this won't do anything. That's because the LEDs are the same as what they were previously set to. However, if you start changing the LEDs list, updating will change what's on the tree.
That's it. That's the entire API.
Except, there's two things to consider:
-
How many LEDs are there? The designs you make depend on knowing the number of LEDs. Thankfully, this is trivial to find - just take
len(self.leds)
, which will never change through the program. - Where are they? Producing most results on the tree requires knowing where the LEDs are. This information will be provided by the event host.