Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e96cca7
commit 66acc9f
Showing
18 changed files
with
10,592 additions
and
1,017 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
/* Ring Of Fire Lights | ||
// Tlc.set(channel (0-15), value (0[off] - 4095[on])) | ||
Author: Carlos Chinchilla | ||
April 2012 | ||
*/ | ||
|
||
#include "Tlc5940.h" | ||
|
||
const int NUM_LEDS = 16 * NUM_TLCS; | ||
const int CHANNELS = NUM_LEDS - 1; | ||
|
||
void all_off(int b_min = 0){ | ||
if (!b_min) | ||
Tlc.clear(); | ||
else | ||
for (int i = 0; i<= CHANNELS; i++) | ||
Tlc.set(i,b_min); | ||
Tlc.update(); | ||
} | ||
|
||
void all_on(int b_max = 2500){ | ||
b_max = b_max % 4096; | ||
for (int i = 0; i<= CHANNELS; i++) | ||
Tlc.set(i,b_max); | ||
Tlc.update(); | ||
} | ||
|
||
void phaser_single(int b_max = 2500, int b_min = 0,int d = 65){ | ||
all_off(); | ||
for (int i = 0; i<= CHANNELS; i++){ | ||
Tlc.set(i, b_max); | ||
Tlc.set((i-1) % NUM_LEDS, b_min); | ||
Tlc.update(); | ||
delay(d); | ||
} | ||
} | ||
|
||
void phaser_delay(int b_max = 4095, int b_min = 0,int d = 65){ | ||
all_off(); | ||
int inc = 500; | ||
for (int i = 0; i<= CHANNELS; i++){ | ||
Tlc.set(i, b_max); | ||
Tlc.set((i-1) % NUM_LEDS, b_max-(3*inc)); | ||
Tlc.set((i-2) % NUM_LEDS, b_max-(5*inc)); | ||
Tlc.set((i-3) % NUM_LEDS, b_max-(7*inc)); | ||
Tlc.set((i-4) % NUM_LEDS, b_max-(9*inc)); | ||
Tlc.set((i-5) % NUM_LEDS, b_min); | ||
Tlc.update(); | ||
delay(d); | ||
} | ||
} | ||
|
||
void blink_all(int b_max = 4095, int b_min = 0,int d_on = 200, int d_off = 200, int repeat = 3){ | ||
for(int i = 0; i < repeat; i++){ | ||
all_on(b_max); | ||
delay(d_on); | ||
all_off(b_min); | ||
delay(d_off); | ||
} | ||
} | ||
|
||
void blink_alternate(int b_max = 2500, int b_min = 0, int d = 500, int repeat = 3){ | ||
for(int i = 0; i < repeat; i++){ | ||
for(int h = 0; h <= CHANNELS; h+= 2){ | ||
Tlc.set(h,b_max); | ||
Tlc.set(h+1,b_min); | ||
} | ||
Tlc.update(); | ||
delay(d); | ||
for(int h = 0; h <= CHANNELS; h+=2){ | ||
Tlc.set(h,b_min); | ||
Tlc.set(h+1,b_max); | ||
} | ||
Tlc.update(); | ||
delay(d); | ||
} | ||
} | ||
|
||
void blink_half(int b_max = 2500, int b_min = 0, int d = 500, int repeat = 3){ | ||
for(int i = 0; i < repeat; i++){ | ||
for(int h = 0; h <= CHANNELS/2; h++){ | ||
Tlc.set(h,b_max); | ||
Tlc.set(h+CHANNELS/2,b_min); | ||
} | ||
Tlc.update(); | ||
delay(d); | ||
for(int h = 0; h <= CHANNELS/2; h++){ | ||
Tlc.set(h,b_min); | ||
Tlc.set(h+CHANNELS/2,b_max); | ||
} | ||
Tlc.update(); | ||
delay(d); | ||
} | ||
} | ||
|
||
void fade_all(int b_max = 4095, int b_min = 0,int d = 100, int repeat = 3){ | ||
all_off(); | ||
int b = 0; | ||
for(int i = 0; i < repeat; i++){ | ||
for(;b <= b_max;b+=400){ | ||
all_on(b); | ||
delay(d); | ||
} | ||
|
||
for(;b >= b_min ;b-=400){ | ||
all_on(b); | ||
delay(d); | ||
} | ||
} | ||
} | ||
|
||
/* | ||
void stellar(){ | ||
int a = random(0,CHANNELS); | ||
for | ||
int a_d = 100 + random(500,1000); | ||
int b = (random(0,CHANNELS) + a)% NUM_LEDS; | ||
int c = (random(0,CHANNELS) + b + a)% NUM_LEDS; | ||
int d = (random(0,CHANNELS) + b + a - c)% NUM_LEDS;*/ | ||
|
||
|
||
/*------------------------------------ARDUINO FUNCTIONS----------------------------------*/ | ||
|
||
void setup() | ||
{ | ||
Tlc.init(); | ||
} | ||
|
||
void loop() | ||
{ | ||
|
||
//phaser_delay(); | ||
//phaser_single(); | ||
//all_on(); | ||
//all_off(); | ||
blink_alternate(); | ||
//blink_half(); | ||
//fade_all(); | ||
//delay(500); | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Flash & Strip | ||
|
||
BOM - coming soon | ||
Item Digikey P. No. Manufacturer Manufacturer P. No. URL | ||
-------------------------------------------------------------------------------------------------------------------------------------------- | ||
Switches: | ||
SWITCH SLIDE SPDT 30V.2A PC MNT EG1903-ND E-Switch EG1218 http://spec.e-switch.com/P-J/P040040c.pdf | ||
|
||
SWITCH TACTILE SPST-NO 0.05A 12V 450-1759-1-ND TE Connectivity FSM4JSMATR http://media.digikey.com/pdf/Data%20Sheets/Tyco%20Electronics%20Alcoswitch%20PDFs/FSM%20Series.pdf | ||
|
||
Connectors: | ||
CONN RCPT REV MICRO USB TYPE B 609-4048-1-ND FCI 10103592-0001LF http://portal.fciconnect.com/Comergent//fci/drawing/10103592.pdf | ||
|
||
ICs: | ||
FT232RL-IC USB FS SERIAL UART 28-SSOP 768-1007-2-ND Future Technology Devices Int. FT232RL-REEL http://www.ftdichip.com/Support/Documents/DataSheets/ICs/DS_FT232R.pdf | ||
|
||
TLC5940-IC LED DVR PWM CONTROL 28HTSSOP 296-25565-1-ND Texas Instruments TLC59401PWPR http://www.ti.com/lit/ds/symlink/tlc59401.pdf | ||
|
||
IC REG LDO 1.5A 5.0V TO-263-5 MIC29151-5.0WU TR-ND Micrel Inc MIC29151-5.0WU TR http://www.micrel.com/_PDF/mic29150.pdf | ||
|
||
MCU AVR 32K FLASH 20MHZ 32TQFP ATMega328P-AN-ND ATMEL ATMEGA328P-AN www.atmel.com/Images/doc8271.pdf | ||
|
||
CER RESONATOR 16.0MHZ SMD 490-1198-2-ND Murata Electronics North America CSTCE16M0V53-R0 http://www.murata.com/products/catalog/pdf/p17e.pdf#page=8 | ||
|
||
Capacitors: | ||
CAP CER 10000PF 50V 20% X7R 0805 399-1160-2-ND Kemet C0805C103M5RACTU http://www.kemet.com/datasheets&C0805C103M5RACTU | ||
CAP CER 0.1UF 50V 20% X7R 0805 399-1169-2-ND Kemet C0805C104M5RACTU http://www.kemet.com/datasheets&C0805C104M5RACTU | ||
CAP CER 10UF 10V Y5V 0805 445-1371-2-ND TDK corporation C2012Y5V1A106Z | ||
|
||
Resistors: | ||
RES 1.00K OHM 1/8W 1% 0805 SMD P1.00KCTR-ND Panasonic - ECG ERJ-6ENF1001V | ||
RES 10.00K OHM 1/8W 1% 0805 SMD P10.0KCTR-ND Panasonic - ECG ERJ-6ENF1002V | ||
RES 330 OHM 1/8W 1% 0805 SMD P330CTR-ND Panasonic - ECG ERJ-6ENF3300V | ||
|
||
LED_0805 754-1131-2-ND Kingbright Corp APT2012SGC http://www.us.kingbright.com/images/catalog/SPEC/APT2012SGC.pdf | ||
LED RED/GREEN/BLUE PLCC6 SMD CLP6C-FKB-CM1Q1H1BB7R3R3CT-ND Cree CLP6C-FKB-CM1Q1H1BB7R3R3 http://www.cree.com/~/media/Files/Cree/LED%20Components%20and%20Modules/HB/Data%20Sheets/CLP6CFKB(933).pdf |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.