Made tree display more random
[pi-xmas.git] / xmas_tree / twin_random.py
index 1b4d2b6b7ba6e8f8aaaa454e6e717184419dba23..d3b7703fd0aa9a6de265840d4c8b21c0de6769c8 100644 (file)
@@ -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