Exemplo n.º 1
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()
Exemplo n.º 2
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)
#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


Exemplo n.º 4
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