File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -36,10 +36,10 @@ void drawPlasma( unsigned long counter ) {
36
36
float utime = float (counter)/TIME_DILATION;
37
37
38
38
leds.startDrawing ();
39
- for (int col = 0 ; col < leds.columns (); col++ ) {
39
+ for (unsigned int col = 0 ; col < leds.columns (); col++ ) {
40
40
float x = ((float )col/((float )leds.columns ()*SPACE_STRETCH_FACTOR)) - 0.5 ;
41
41
42
- for (int row = 0 ; row < leds.rows (); row++ ) {
42
+ for (unsigned int row = 0 ; row < leds.rows (); row++ ) {
43
43
float y = ((float )row/((float )leds.rows ()*SPACE_STRETCH_FACTOR)) - 0.5 ;
44
44
45
45
float v1 = sinf (x*10.0 +utime);
@@ -87,7 +87,12 @@ unsigned long loopCounter = 0;
87
87
unsigned long timeCount = 0 ;
88
88
bool timeIncrement = true ;
89
89
90
+ #if (defined(__arm__)&& defined(TEENSYDUINO))
91
+ // slow things down for the Teensy
92
+ const unsigned long loopMod = 20000 ;
93
+ #else
90
94
const unsigned long loopMod = 50 ;
95
+ #endif
91
96
92
97
void loop () {
93
98
leds.loop ();
Original file line number Diff line number Diff line change @@ -36,10 +36,10 @@ void drawPlasma( unsigned long counter ) {
36
36
float utime = float (counter)/TIME_DILATION;
37
37
38
38
leds.startDrawing ();
39
- for (int col = 0 ; col < leds.columns (); col++ ) {
39
+ for (unsigned int col = 0 ; col < leds.columns (); col++ ) {
40
40
float x = ((float )col/((float )leds.columns ()*SPACE_STRETCH_FACTOR)) - 0.5 ;
41
41
42
- for (int row = 0 ; row < leds.rows (); row++ ) {
42
+ for (unsigned int row = 0 ; row < leds.rows (); row++ ) {
43
43
float y = ((float )row/((float )leds.rows ()*SPACE_STRETCH_FACTOR)) - 0.5 ;
44
44
45
45
float v1 = sinf (x*10.0 +utime);
@@ -87,7 +87,12 @@ unsigned long loopCounter = 0;
87
87
unsigned long timeCount = 0 ;
88
88
bool timeIncrement = true ;
89
89
90
+ #if (defined(__arm__)&& defined(TEENSYDUINO))
91
+ // slow things down for the Teensy
92
+ const unsigned long loopMod = 20000 ;
93
+ #else
90
94
const unsigned long loopMod = 500 ;
95
+ #endif
91
96
92
97
void loop () {
93
98
leds.loop ();
You can’t perform that action at this time.
0 commit comments