p10tyr / thepihut3dxmastree-examples

The Pi Hut 3D Xmass Tree Examples
25 stars 16 forks source link

New Example #8

Closed GlynM001 closed 6 years ago

GlynM001 commented 6 years ago

An example Python3 program for the Pi Hut Xmas tree that does multiple patterns in a random order. Needs the GPIO Zero Library

The PI Hut Xmas tree board is optionaly modified with a button between the otherwise unused GPIO3 & ground. This is to provide a clean shutdown method when used in a stand-alone mode.

If needed the button is wired between pins 5 & 6 of the GPIO connector on the tree. Note that it can take a while for the program to spot that the shutdown button has been pushed. So hold the button in until the light sequence stops.

My first attempt at programming in Python so apologies if it is not very elegant.