Subversion Repositories Projects

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1999 - 1
// ------------------------------------------------------------------
2
// Move a single circling LED from outer to inner and leave LEDs on
3
// ------------------------------------------------------------------
4
void spiralRev_glow( uint8_t r, uint8_t g, uint8_t b, uint8_t wait) {
5
  uint8_t ri1, ri2, ri3, ri4, ri5, ri6, ri7, ri8;
6
 
7
  for (uint8_t j = riggerSize; j > 0 ; j--){
8
     for (uint8_t i = 1 ; i <= rigger ; i++){
9
        if (i == 1){
10
        strip.setPixelColor(j-1, r, g, b, 1, 0, 0, 0, 0, 0, 0, 0);
11
        strip.show();
12
        delay ( wait );
13
        // strip.setPixelColor(j-1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0);
14
remoteControl();
15
if (Effectcounter1 != Effectcounter2) {
16
   return;}
17
        strip.show();
18
        delay ( wait );
19
        }
20
 
21
        if (i == 2){
22
        strip.setPixelColor(j-1, r, g, b, 0, 1, 0, 0, 0, 0, 0, 0);
23
        strip.show();
24
        delay ( wait );
25
        // strip.setPixelColor(j-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0);
26
remoteControl();
27
if (Effectcounter1 != Effectcounter2) {
28
   return;}
29
        strip.show();
30
        delay ( wait );
31
        }
32
 
33
        if (i == 3){
34
        strip.setPixelColor(j-1, r, g, b, 0, 0, 1, 0, 0, 0, 0, 0);
35
        strip.show();
36
        delay ( wait );
37
        // strip.setPixelColor(j-1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0);
38
remoteControl();
39
if (Effectcounter1 != Effectcounter2) {
40
   return;}
41
        strip.show();
42
        delay ( wait );
43
        }
44
 
45
        if (i == 4){
46
        strip.setPixelColor(j-1, r, g, b, 0, 0, 0, 1, 0, 0, 0, 0);
47
        strip.show();
48
        delay ( wait );
49
        // strip.setPixelColor(j-1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0);
50
remoteControl();
51
if (Effectcounter1 != Effectcounter2) {
52
   return;}
53
        strip.show();
54
        delay ( wait );
55
        }
56
 
57
        if (i == 5){
58
        strip.setPixelColor(j-1, r, g, b, 0, 0, 0, 0, 1, 0, 0, 0);
59
        strip.show();
60
        delay ( wait );
61
        // strip.setPixelColor(j-1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0);
62
remoteControl();
63
if (Effectcounter1 != Effectcounter2) {
64
   return;}
65
        strip.show();
66
        delay ( wait );
67
        }
68
 
69
        if (i == 6){
70
        strip.setPixelColor(j-1, r, g, b, 0, 0, 0, 0, 0, 1, 0, 0);
71
        strip.show();
72
        delay ( wait );
73
        strip.setPixelColor(j-1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0);
74
remoteControl();
75
if (Effectcounter1 != Effectcounter2) {
76
   return;}
77
        strip.show();
78
        delay ( wait );
79
        }
80
 
81
        if (i == 7){
82
        strip.setPixelColor(j-1, r, g, b, 0, 0, 0, 0, 0, 0, 1, 0);
83
        strip.show();
84
        delay ( wait );
85
        // strip.setPixelColor(j-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0);
86
remoteControl();
87
if (Effectcounter1 != Effectcounter2) {
88
   return;}
89
        strip.show();
90
        delay ( wait );
91
        }
92
 
93
         if (i == 8){
94
        strip.setPixelColor(j-1, r, g, b, 0, 0, 0, 0, 0, 0, 0, 1);
95
        strip.show();
96
        delay ( wait );
97
        // strip.setPixelColor(j-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
98
remoteControl();
99
if (Effectcounter1 != Effectcounter2) {
100
   return;}
101
        strip.show();
102
        delay ( wait );
103
         }
104
     }
105
  }
106
  for (uint8_t j=0; j< riggerSize ; j++){
107
    strip.setPixelColor(j, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1);
108
    }
109
  strip.show();
110
  delay ( wait );
111
}