From 175d4b91a2c53f67d6e4efa4fb2e62b753707d18 Mon Sep 17 00:00:00 2001 From: Jakob Stendahl Date: Sun, 2 Oct 2016 10:21:13 +0200 Subject: Update python.py Just a save --- Raspberry Pi/python.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Raspberry Pi/python.py b/Raspberry Pi/python.py index 71df0de..8ed3130 100644 --- a/Raspberry Pi/python.py +++ b/Raspberry Pi/python.py @@ -5,12 +5,26 @@ import i2cPixel """ Decalrations """ pixels = 10 +addresses = [0, 24, 25, 35] # legg til en start og en stopp for hvert trinn def hexToRgb(value): value = value.lstrip('#') lv = len(value) return tuple(int(value[i:i+lv/3], 16) for i in range(0, lv, lv/3)) +def lightStaircase(direction): + repeats = len(addresses) + repeats = repeats / 2 + + if direction = "up": + loopCondition = repeats + while loopCondition >> pixels + + else: + loopCondition = 0 + + return true + def main(): """ Setup i2c communication """ -- cgit v1.2.3