Skip to content

Runshaw-Hack-Club/Christmas-Tree-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Runshaw Tree API

This is a simple API for the Runshaw Hack Club Christmas tree project. It allows you to write effects for the tree, but also test them on a pygame based simulator before deploying them to the tree.

Installation

Use pip in a terminal. Example:

pip install git+https://github.com/Runshaw-Hack-Club/Christmas-Tree-API

Example Usage

import time
from runshawtree import controller

# Set debug to False to run on the tree
tree = controller.Tree(debug=True, num_leds=200)

for i in range(tree.backend.num_leds):
    tree.set_pixel(i, (255, 255, 255))
    tree.show()
    time.sleep(0.05)
tree.clear()
tree.show()

Note

When running with debug set to False, the default neopixel config will be for a GBR strip. You can pass this to the Tree constructor if you have a different strip, for example:

tree = controller.Tree(debug=False, num_leds=200, order=["red", "green", "blue"])

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages