コード例 #1
0
def all_blue():
    input("go")
    u.sendRGB(ser0, 2, cc.LIGHT_BLUE)
    u.sendRGB(ser1, 2, cc.LIGHT_BLUE)
    sleep(1.1)
    u.sendRGB(ser0, 1, cc.LIGHT_BLUE)
    u.sendRGB(ser1, 1, cc.LIGHT_BLUE)
コード例 #2
0
def all_orange():
    input("go")
    u.sendRGB(ser0, 2, cc.RED_ORANGE)
    u.sendRGB(ser1, 2, cc.RED_ORANGE)
    sleep(1.1)
    u.sendRGB(ser0, 1, cc.RED_ORANGE)
    u.sendRGB(ser1, 1, cc.RED_ORANGE)
コード例 #3
0
def all_off():
    input("go")
    u.sendRGB(ser0, 2, cc.OFF)
    u.sendRGB(ser1, 2, cc.OFF)
    sleep(1.1)
    u.sendRGB(ser0, 1, cc.OFF)
    u.sendRGB(ser1, 1, cc.OFF)
コード例 #4
0
def all_green():
    input("go")
    u.sendRGB(ser0, 2, cc.GREEN)
    u.sendRGB(ser1, 2, cc.GREEN)
    sleep(1.1)
    u.sendRGB(ser0, 1, cc.GREEN)
    u.sendRGB(ser1, 1, cc.GREEN)
コード例 #5
0
def all_purple():
    input("go")
    u.sendRGB(ser0, 2, cc.PURPLE)
    u.sendRGB(ser1, 2, cc.PURPLE)
    sleep(1.1)
    u.sendRGB(ser0, 1, cc.PURPLE)
    u.sendRGB(ser1, 1, cc.PURPLE)
コード例 #6
0
def all_red():
    input("go")
    u.sendRGB(ser0, 2, cc.RED)
    u.sendRGB(ser1, 2, cc.RED)
    sleep(1.1)
    u.sendRGB(ser0, 1, cc.RED)
    u.sendRGB(ser1, 1, cc.RED)
コード例 #7
0
ファイル: cues.py プロジェクト: AndrewAF1/greased-lighting
def freddy():
    input("half")
    u.sendRGB(ser0, 1, cc.PURPLE)
    u.sendRGB(ser1, 1, cc.PURPLE)

    input("full")
    u.sendRGB(ser0, 2, cc.PURPLE)
    u.sendRGB(ser1, 2, cc.PURPLE)
コード例 #8
0
ファイル: cues.py プロジェクト: AndrewAF1/greased-lighting
def hydromatic():
    input("it's automatic...")
    u.sendRGB(ser0, 1, cc.RED)

    input("it's systematic...")
    u.sendRGB(ser1, 1, cc.RED)

    input("it's hydromatic...")
    u.sendRGB(ser0, 2, cc.ORANGE)
    u.sendRGB(ser1, 2, cc.ORANGE)

    input("it's greased lightning!...")
    lc.flash(ser0, 1, cc.RED, 1000, 200)
    lc.flash(ser1, 1, cc.RED, 1000, 200)
    sleep(1.1)
    lc.flash(ser0, 2, cc.ORANGE, 1000, 200)
    lc.flash(ser1, 2, cc.ORANGE, 1000, 200)
コード例 #9
0
ファイル: cues.py プロジェクト: AndrewAF1/greased-lighting
def hand_jive():
    input("go")
    lc.flash(ser0, 1, cc.RED, 1000, 1100)
    lc.flash(ser1, 2, cc.TURQUOISE, 1000, 1100)
    u.sendRGB(ser2, 1, cc.LIGHT_BLUE)
    sleep(1.2)
    lc.flash(ser0, 2, cc.LIME_GREEN, 1000, 1100)
    lc.flash(ser1, 1, cc.PURPLE, 1000, 1100)
    u.sendRGB(ser2, 2, cc.LIGHT_BLUE)

    input("repeat")
    lc.flash(ser0, 1, cc.RED, 1000, 1200)
    lc.flash(ser1, 2, cc.TURQUOISE, 1000, 1200)
    u.sendRGB(ser2, 1, cc.LIGHT_BLUE)
    sleep(1.2)
    lc.flash(ser0, 2, cc.LIME_GREEN, 1000, 1200)
    lc.flash(ser1, 1, cc.PURPLE, 1000, 1200)
    u.sendRGB(ser2, 2, cc.LIGHT_BLUE)
コード例 #10
0
ファイル: cues.py プロジェクト: AndrewAF1/greased-lighting
def animated():
    input("go")
    u.sendRGB(ser1, 1, cc.RED)
    sleep(1.2)
    u.sendRGB(ser1, 2, cc.ORANGE)
    sleep(1.2)
    u.sendRGB(ser2, 2, cc.YELLOW)
    sleep(1.2)
    u.sendRGB(ser2, 1, cc.GREEN)
    sleep(1.2)
    u.sendRGB(ser0, 2, cc.BLUE)
    sleep(1.2)
    u.sendRGB(ser0, 1, cc.PURPLE)
コード例 #11
0
ファイル: cues.py プロジェクト: AndrewAF1/greased-lighting
def beauty_school():
    input("start")
    u.sendRGB(ser0, 2, cc.PINK)
    u.sendRGB(ser1, 2, cc.PINK)

    input("nananananananana")
    u.sendRGB(ser2, 1, cc.LIGHT_BLUE)
    sleep(1.1)
    u.sendRGB(ser2, 2, cc.LIGHT_BLUE)

    input("stairs")
    u.sendRGB(ser0, 1, cc.PURPLE)
    u.sendRGB(ser1, 1, cc.PURPLE)
コード例 #12
0
ファイル: cues.py プロジェクト: AndrewAF1/greased-lighting
def magic_changes():
    input("c")
    u.sendRGB(ser0, 1, cc.RED)
    u.sendRGB(ser1, 1, cc.RED)

    input("a")
    u.sendRGB(ser0, 2, cc.BLUE)
    u.sendRGB(ser1, 2, cc.BLUE)

    input("f")
    u.sendRGB(ser0, 2, cc.RED)
    u.sendRGB(ser1, 2, cc.RED)

    input("g")
    u.sendRGB(ser0, 1, cc.BLUE)
    u.sendRGB(ser1, 1, cc.BLUE)
コード例 #13
0
ファイル: cues.py プロジェクト: AndrewAF1/greased-lighting
def intermission():
    input("curtain")
    u.sendRGB(ser0, 2, cc.PURPLE)
    u.sendRGB(ser2, 1, cc.TURQUOISE)
    sleep(1.1)
    u.sendRGB(ser1, 2, cc.PURPLE)
    u.sendRGB(ser2, 2, cc.TURQUOISE)
    sleep(1.1)
    u.sendRGB(ser0, 1, cc.PURPLE)
    u.sendRGB(ser1, 1, cc.PURPLE)

    input("song on")
    lc.flash(ser0, 2, cc.RED, 1000, 500)
    lc.flash(ser1, 2, cc.RED, 1000, 500)
    sleep(1.1)
    lc.flash(ser0, 1, cc.PINK, 1000, 500)
    lc.flash(ser1, 1, cc.PINK, 1000, 500)
    sleep(1.1)
    u.sendRGB(ser2, 1, cc.TURQUOISE)
    u.sendRGB(ser2, 2, cc.TURQUOISE)

    input("song 2")
    lc.flash(ser0, 2, cc.BLUE, 1000, 500)
    lc.flash(ser1, 2, cc.BLUE, 1000, 500)
    sleep(1.1)
    lc.flash(ser0, 1, cc.PURPLE, 1000, 500)
    lc.flash(ser1, 1, cc.PURPLE, 1000, 500)
    sleep(1.1)
    u.sendRGB(ser2, 1, cc.TURQUOISE)
    u.sendRGB(ser2, 2, cc.TURQUOISE)
コード例 #14
0
ファイル: cues.py プロジェクト: AndrewAF1/greased-lighting
def solid():
    input("go")
    u.sendRGB(ser0, 2, cc.RED)
    u.sendRGB(ser2, 1, cc.TURQUOISE)
    sleep(1.1)
    u.sendRGB(ser1, 2, cc.RED)
    u.sendRGB(ser2, 2, cc.TURQUOISE)
    sleep(1.1)
    u.sendRGB(ser0, 1, cc.RED)
    u.sendRGB(ser1, 1, cc.RED)
コード例 #15
0
import color_consts as cc
import utils as u
import LED_commands as lc
from time import sleep
import random as r

import serial as s


ser2 = s.Serial("/dev/ttyACM2", 9600)

while True:
    input("go")
    sleep(1.1)
    u.sendRGB(ser2, 2, cc.YELLOW)
    sleep(1.1)
    u.sendRGB(ser2, 1, cc.YELLOW)
コード例 #16
0
import color_consts as cc
import utils as u
from time import sleep
import serial as s

ser0 = s.Serial("/dev/ttyACM0", 9600)
ser1 = s.Serial("/dev/ttyACM1", 9600)
ser2 = s.Serial("/dev/ttyACM2", 9600)

while True:
    input("go")
    u.sendRGB(ser2, 1, cc.YELLOW_WHITE)
    sleep(1.1)
    u.sendRGB(ser2, 2, cc.YELLOW_WHITE)