Example #1
0
import board  #pylint:disable-msg=import-error
import digitalio  #pylint:disable-msg=import-error
from fancyLED import FancyLED  # calling fancyLED class from fancyLED

K1 = board.D1
J1 = board.D5
L1 = board.D12
K2 = board.D9
J2 = board.D7
L2 = board.D4
# gives each value a pin
fancy1 = FancyLED(
    K1, J1, L1)  # using pins from one of the tri-color LEDs, and not the other
fancy2 = FancyLED(K2, J2, L2)

while True:  # goes to the class of fancyLED sin fancyLED, goes to the according section and follows that code
    fancy1.alternate()
    fancy2.blink()
    fancy1.chase()
    fancy2.sparkle()
Example #2
0
from fancyLED import FancyLED
import board  #pylint: disable=import-error

fancy1 = FancyLED(board.D3, board.D4, board.D5)  #LED 1-3
fancy2 = FancyLED(board.D8, board.D9, board.D10)  #LED 3-6

while True:  #modules to run through in order
    fancy1.alternate()
    fancy2.blink()
    fancy1.chase()
    fancy2.sparkle()
#Lukas
#This is the main for the Fancy Led code this section just told it which code to run
#10/2/19

import board #pylint: disable-msg=import-error
from fancyLED import FancyLED

fancy1 = FancyLED( board.D2, board.D3, board.D4)# setting Leds to the these pins
fancy2 = FancyLED( board.D5, board.D6, board.D7)# setting Leds to the these pins

while True:

    fancy1.alternate()#run the alternate code in my FancyLed.py code
    fancy2.blink()#run the blink code in my FancyLed.py code
    fancy1.chase()#run the chase code in my FancyLed.py code
    fancy2.sparkle()#run the sparkle code in my FancyLed.py code


Example #4
0
from fancyLED import FancyLED
import board
import time

fancy1 = FancyLED(board.D2, board.D3, board.D4)
fancy2 = FancyLED(board.D5, board.D6, board.D7)

while True:
    print("working")
    for i in range(0, 3):
        fancy1.alternate()
        time.sleep(1)
    for i in range(0, 3):
        fancy2.blink()
        time.sleep(1)
    for i in range(0, 3):
        fancy1.chase()
    for i in range(0, 15):
        fancy2.sparkle()
Example #5
0
from fancyLED import FancyLED
import board

pins1 = [board.D1, board.D2, board.D3]
pins2 = [board.D4, board.D5, board.D7]

fancy1 = FancyLED(pins1)
fancy2 = FancyLED(pins2)

print("go")

while True:
    fancy1.alternate()
    fancy2.blink()
    fancy1.chase()
    fancy2.sparkle()
Example #6
0
from fancyLED import FancyLED

fancy1 = FancyLED(2, 3, 4)
fancy2 = FancyLED(5, 6, 7)

while True:
    fancy1.alternate()
    fancy2.blink()
    fancy1.chase()
    fancy2.sparkle()
#This is the simple command code that corresponds to fancyLED
import board #pylint: disable-msg=import-error
from fancyLED import FancyLED

#Establish variables for pins: not exactly necessary, but it makes things look cleaner
L1 = board.D2
L2 = board.D3
L3 = board.D4
L4 = board.D5
L5 = board.D6
L6 = board.D7

#I have two versions: fancy1 and fancy2
fancy1 = FancyLED(L1,L2,L3)
fancy2 = FancyLED(L4,L5,L6)

while True:
    #I tell the computer what each of these things means in the fancyLED code
    fancy1.alternate()
    fancy2.blink()
    fancy1.chase()
    fancy2.sparkle()
Example #8
0
import time
import board  #pylint: disable-msg=import-error
from fancyLED import FancyLED

fancy1 = FancyLED(board.D2, board.D3, board.D4)
fancy2 = FancyLED(board.D8, board.D9, board.D10)

while True:
    fancy1.alternate()
    time.sleep(3)
    fancy2.blink()
    time.sleep(3)
    fancy1.chase()
    time.sleep(3)
    fancy2.sparkle()
    time.sleep(3)
Example #9
0
import rgb
import board  # pylint: disable=import-error
import time
from fancyLED import FancyLED
# led1 = rgb.RGB(board.D3, board.D4, board.D2)

fancy1 = FancyLED(board.D5, board.D6, board.D7)
fancy2 = FancyLED(board.D2, board.D3, board.D4)

while True:
    fancy1.alternate(.5, 5)

    fancy2.blink(.25, 5)

    for i in range(0, 5):
        fancy2.chase(.1, 1)
        fancy1.chase(.1, 1)

    for i in range(0, 100):
        fancy2.sparkle(.05, 2)
        fancy1.sparkle(.05, 2)
Example #10
0
import board  #pylint:disable-msg=import-error
import digitalio  #pylint:disable-msg=import-error
from fancyLED import FancyLED

K1 = board.D1
J1 = board.D5
L1 = board.D12
K2 = board.D9
J2 = board.D7
L2 = board.D4

fancy1 = FancyLED(K1, J1, L1)
fancy2 = FancyLED(K2, J2, L2)

while True:
    fancy1.alternate()
    fancy2.blink()
    fancy1.chase()
    fancy2.sparkle()
Example #11
0
import board #pylint: disable-msg=import-error
import time
from fancyLED import FancyLED #imports the class and methods

#led pin numbers
two = board.D2
three = board.D3
four = board.D4
five = board.D5
six = board.D6
seven = board.D7

#defines an object as the class
fancy1 = FancyLED(two, three, four)
fancy2 = FancyLED(five, six, seven)

#goes through all the methods
#turns off for 3 seconds between each one
while True:
    fancy1.alternate()
    fancy1.off()
    fancy2.blink()
    fancy2.off()
    fancy1.chase()
    fancy1.off()
    fancy2.sparkle()
    fancy2.off()
Example #12
0
from fancyLED import FancyLED #imports my custom library

fancy1 = FancyLED(2,3,4)
fancy2 = FancyLED(5,6,7) #sets up LEDs

while True:
    fancy1.alternate()
    fancy2.blink() #uses the library
    fancy1.chase()
    fancy2.sparkle()
Example #13
0
# Jude Fairchild
# The main code for FancyLED
# 10/2/19

import time  #pylint: disable-msg=import-error
import board  #pylint: disable-msg=import-error
from digitalio import Direction, Pull, DigitalInOut  #pylint: disable-msg=import-error
from fancyLED import FancyLED

fancy1 = FancyLED(board.D2, board.D3,
                  board.D4)  # These are the Three pins I used for Fancy1
fancy2 = FancyLED(board.D5, board.D6,
                  board.D7)  # These are the Three pins I used for Fancy2

fancy1.alternate()  # Theese are Variables that he Assigned
time.sleep(1)
fancy2.blink()
time.sleep(1)
fancy1.chase()
time.sleep(1)

while True:
    fancy2.sparkle(
    )  # The reasoning for putting this in the While True is it randomizes and is easier to see the random variables when it is in the While True