File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,10 +36,10 @@ void drawPlasma( unsigned long counter ) {
3636 float utime = float (counter)/TIME_DILATION;
3737
3838 leds.startDrawing ();
39- for (int col = 0 ; col < leds.columns (); col++ ) {
39+ for (unsigned int col = 0 ; col < leds.columns (); col++ ) {
4040 float x = ((float )col/((float )leds.columns ()*SPACE_STRETCH_FACTOR)) - 0.5 ;
4141
42- for (int row = 0 ; row < leds.rows (); row++ ) {
42+ for (unsigned int row = 0 ; row < leds.rows (); row++ ) {
4343 float y = ((float )row/((float )leds.rows ()*SPACE_STRETCH_FACTOR)) - 0.5 ;
4444
4545 float v1 = sinf (x*10.0 +utime);
@@ -87,7 +87,12 @@ unsigned long loopCounter = 0;
8787unsigned long timeCount = 0 ;
8888bool timeIncrement = true ;
8989
90+ #if (defined(__arm__)&& defined(TEENSYDUINO))
91+ // slow things down for the Teensy
92+ const unsigned long loopMod = 20000 ;
93+ #else
9094const unsigned long loopMod = 50 ;
95+ #endif
9196
9297void loop () {
9398 leds.loop ();
Original file line number Diff line number Diff line change @@ -36,10 +36,10 @@ void drawPlasma( unsigned long counter ) {
3636 float utime = float (counter)/TIME_DILATION;
3737
3838 leds.startDrawing ();
39- for (int col = 0 ; col < leds.columns (); col++ ) {
39+ for (unsigned int col = 0 ; col < leds.columns (); col++ ) {
4040 float x = ((float )col/((float )leds.columns ()*SPACE_STRETCH_FACTOR)) - 0.5 ;
4141
42- for (int row = 0 ; row < leds.rows (); row++ ) {
42+ for (unsigned int row = 0 ; row < leds.rows (); row++ ) {
4343 float y = ((float )row/((float )leds.rows ()*SPACE_STRETCH_FACTOR)) - 0.5 ;
4444
4545 float v1 = sinf (x*10.0 +utime);
@@ -87,7 +87,12 @@ unsigned long loopCounter = 0;
8787unsigned long timeCount = 0 ;
8888bool timeIncrement = true ;
8989
90+ #if (defined(__arm__)&& defined(TEENSYDUINO))
91+ // slow things down for the Teensy
92+ const unsigned long loopMod = 20000 ;
93+ #else
9094const unsigned long loopMod = 500 ;
95+ #endif
9196
9297void loop () {
9398 leds.loop ();
You can’t perform that action at this time.
0 commit comments