projects
/
pi-xmas.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
014dc3f
)
Made tree display more random
author
Neil Smith
<neil.git@njae.me.uk>
Mon, 14 Dec 2015 10:12:02 +0000
(10:12 +0000)
committer
Neil Smith
<neil.git@njae.me.uk>
Mon, 14 Dec 2015 10:12:02 +0000
(10:12 +0000)
xmas_tree/twin_random.py
patch
|
blob
|
history
diff --git
a/xmas_tree/twin_random.py
b/xmas_tree/twin_random.py
index 1b4d2b6b7ba6e8f8aaaa454e6e717184419dba23..d3b7703fd0aa9a6de265840d4c8b21c0de6769c8 100644
(file)
--- a/
xmas_tree/twin_random.py
+++ b/
xmas_tree/twin_random.py
@@
-9,8
+9,8
@@
tree2.setup() # you must always call setup() first!
\r
# for _ in range(5):
\r
while True:
\r
- leds_on = random.sample(tree2.POSSIBLE_LEDS, random.randint(
0
, 8))
\r
- tree2.leds_on_and_wait(leds_on,
0.8
)
\r
+ leds_on = random.sample(tree2.POSSIBLE_LEDS, random.randint(
1
, 8))
\r
+ tree2.leds_on_and_wait(leds_on,
random.triangular(0.2, 1.0, 0.7)
)
\r
\r
tree2.all_leds_off() # extinguish all LED
\r
\r