Exemple #1
0
from nanoleaf2 import setPanel
from nanoleaf1 import setHue
from time import sleep

N = 5
color_tier = [(43, 201, 27), (113, 214, 20), (184, 228, 13), (255, 242, 7),
              (248, 181, 16), (242, 121, 25), (235, 60, 34), (229, 0, 43)]

setHue(255, 0, 100)

# Initial spending:
setPanel(0, color_tier[3])
setPanel(1, color_tier[4])
setPanel(2, color_tier[3])
setPanel(3, color_tier[2])
setPanel(4, color_tier[2])

# Initialize nanoleaf

wait = input('1')

#Spening on Transportation
setPanel(0, color_tier[3])
setPanel(1, color_tier[4])
setPanel(2, color_tier[3])
setPanel(3, color_tier[5])
setPanel(4, color_tier[2])

wait = input('2')

#Relax 3 days
Exemple #2
0
def final():

    setPanel(0,color_tier[7])
    setPanel(1,color_tier[7])
    setPanel(2,color_tier[0])
    setPanel(3,color_tier[7])
    setPanel(4,color_tier[0])

    wait = input('Slide 3')

    setPanel(0,(0,0,0))
    setPanel(1,(0,0,0))
    setPanel(2,(255,255,255))
    setPanel(3,(0,0,0))
    setPanel(4,(0,0,0))

    wait = input('Slide 4')

    setPanel(0,(0,0,0))
    setPanel(1,(0,0,0))
    setPanel(2,(0,0,0))
    setPanel(3,(255,255,255))
    setPanel(4,(0,0,0))

    wait = input('Slide 5')

    setPanel(0,(0,0,0))
    setPanel(1,(0,0,0))
    setPanel(2,(0,0,0))
    setPanel(3,(0,0,0))
    setPanel(4,(255,255,255))

    wait = input('End of presentation')

    setPanel(0,(0,0,0))
    setPanel(1,(0,0,0))
    setPanel(2,(0,0,0))
    setPanel(3,(0,0,0))
    setPanel(4,(0,0,0))
Exemple #3
0
# demo4

# Green + Green + Yellow + Red + Yellow

from nanoleaf2 import setPanel
N = 5

color_tier = [(43, 201, 27), (113, 214, 20), (184, 228, 13), (255, 242, 7),
              (248, 181, 16), (242, 121, 25), (235, 60, 34), (229, 0, 43)]

setPanel(0, color_tier[0])
setPanel(1, color_tier[0])
setPanel(2, color_tier[0])
setPanel(3, color_tier[3])
setPanel(4, color_tier[7])
Exemple #4
0
def updatePanel(spent,budget,i):
    if spent < budget*0.125:
        setPanel(i,color_tier[0])
    elif spent >= budget*0.125 and spent < budget*0.25:
        setPanel(i,color_tier[1])
    elif spent >= budget*0.25 and spent < budget*0.375:
        setPanel(i,color_tier[2])
    elif spent >= budget*0.375 and spent < budget*0.5:
        setPanel(i,color_tier[3])
    elif spent >= budget*0.5 and spent < budget*0.625:
        setPanel(i,color_tier[4])
    elif spent >= budget*0.625 and spent < budget*0.75:
        setPanel(i,color_tier[5])
    elif spent >= budget*0.75 and spent < budget*0.875:
        setPanel(i,color_tier[6])
    elif spent >= budget*0.875:
        setPanel(i,color_tier[7])