Open dirkblaze opened 7 years ago
What did you try?
On Feb 16, 2017, at 4:51 AM, dirkblaze notifications@github.com wrote:
out
On Feb 16, 2017, at 11:42 AM, Dan Royer notifications@github.com wrote:
What did you try?
On Feb 16, 2017, at 4:51 AM, dirkblaze notifications@github.com wrote:
out
The following, and numerous variations:
const int ledsPerStrip = 600;
DMAMEM int displayMemory[ledsPerStrip6]; int drawingMemory[ledsPerStrip6];
const int config = WS2811_GRB | WS2811_800kHz;
OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
void setup() { leds.begin(); leds.show(); }
void loop() {
GenerateRow1 (BLUE);
GenerateRow1 (RED);
GenerateRow1 (GREEN);
GenerateRow1 (BLUE);
GenerateRow1 (YELLOW);
GenerateRow1 (WHITE);
}
void colorWipe(int color) { for (int i=0; i < leds.numPixels(); i++) { leds.setPixel(i, color); leds.show(); } }
void GenerateRow1(int color) {
for (int j=0; j<50; j++) // This loop lights all the LEDs in the row { for (int i=0; i < leds.numPixels(); i=i+100) // This loop is for each row; 12 rows of 50 LEDs; two rows at a time! { leds.setPixel(j+i, color); // the first row counts up (0-49) if (i+99-j < leds.numPixels())
leds.setPixel(i+99-j, color); // the next row counts backwards! (99-50)
leds.show();
}
}
}
My matrix consists of 12, 50 LED strings tied together; hence, 600 LEDs
This runs very, very slowly!! Other test programs run reasonably.
Any idea what could make it slow?
Thanks!
Bruce
Bruce Kahn West Chester, PA (610) 331 - 3503
Try this, which unrolls the loops a bit and doesn't have the if() setPixel() that adds 33% more work.
void GenerateRow1(int color) { int k=0;
for (int i=0; i<NUM_ROWS; i+=2) // This loop lights all the LEDs in the row { for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(k++, color); // the first row counts up (0-49) leds.show(); } k+=NUM_COLS; for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(--k, color); // the next row counts backwards! (99-50) leds.show(); } k+=NUM_COLS; } }
On Thu, Feb 16, 2017 at 2:28 PM, dirkblaze notifications@github.com wrote:
On Feb 16, 2017, at 11:42 AM, Dan Royer notifications@github.com wrote:
What did you try?
On Feb 16, 2017, at 4:51 AM, dirkblaze notifications@github.com wrote:
out
The following, and numerous variations:
include
const int ledsPerStrip = 600;
DMAMEM int displayMemory[ledsPerStrip6]; int drawingMemory[ledsPerStrip6];
const int config = WS2811_GRB | WS2811_800kHz;
OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
void setup() { leds.begin(); leds.show(); }
define GREEN 0xFF0000 // These RGBs are correct for our LEDs
define RED 0x00FF00
define BLUE 0x0000FF
define YELLOW 0xFFFF00
define PINK 0xFF1088åç
define ORANGE 0xE05800
define WHITE 0xFFFFFF
define BLACK 0x000000
void loop() {
GenerateRow1 (BLUE);
GenerateRow1 (RED);
GenerateRow1 (GREEN);
GenerateRow1 (BLUE);
GenerateRow1 (YELLOW);
GenerateRow1 (WHITE);
}
void colorWipe(int color) { for (int i=0; i < leds.numPixels(); i++) { leds.setPixel(i, color); leds.show(); } }
void GenerateRow1(int color) {
for (int j=0; j<50; j++) // This loop lights all the LEDs in the row { for (int i=0; i < leds.numPixels(); i=i+100) // This loop is for each row; 12 rows of 50 LEDs; two rows at a time! { leds.setPixel(j+i, color); // the first row counts up (0-49) if (i+99-j < leds.numPixels())
leds.setPixel(i+99-j, color); // the next row counts backwards! (99-50)
leds.show(); } } }
My matrix consists of 12, 50 LED strings tied together; hence, 600 LEDs
This runs very, very slowly!! Other test programs run reasonably.
Any idea what could make it slow?
Thanks!
Bruce
Bruce Kahn West Chester, PA (610) 331 - 3503 <(610)%20331-3503>
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/LEDWall/issues/3#issuecomment-280483100, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZYhrBvlJ6UEucj3fFvyx9SqkWYXiKdks5rdM1-gaJpZM4MC-Rn .
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 Mo: +1 (604) 916-2281
then again, maybe I don't understand what you're trying to do.
a) slowly light one light at a time, or b) set all lights to one color
?
On Thu, Feb 16, 2017 at 2:54 PM, Dan Royer dan@marginallyclever.com wrote:
Try this, which unrolls the loops a bit and doesn't have the if() setPixel() that adds 33% more work.
define NUM_ROWS (12)
define NUM_COLS (50)
void GenerateRow1(int color) { int k=0;
for (int i=0; i<NUM_ROWS; i+=2) // This loop lights all the LEDs in the row { for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(k++, color); // the first row counts up (0-49) leds.show(); } k+=NUM_COLS; for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(--k, color); // the next row counts backwards! (99-50) leds.show(); } k+=NUM_COLS; } }
On Thu, Feb 16, 2017 at 2:28 PM, dirkblaze notifications@github.com wrote:
On Feb 16, 2017, at 11:42 AM, Dan Royer notifications@github.com wrote:
What did you try?
On Feb 16, 2017, at 4:51 AM, dirkblaze notifications@github.com wrote:
out
The following, and numerous variations:
include
const int ledsPerStrip = 600;
DMAMEM int displayMemory[ledsPerStrip6]; int drawingMemory[ledsPerStrip6];
const int config = WS2811_GRB | WS2811_800kHz;
OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
void setup() { leds.begin(); leds.show(); }
define GREEN 0xFF0000 // These RGBs are correct for our LEDs
define RED 0x00FF00
define BLUE 0x0000FF
define YELLOW 0xFFFF00
define PINK 0xFF1088åç
define ORANGE 0xE05800
define WHITE 0xFFFFFF
define BLACK 0x000000
void loop() {
GenerateRow1 (BLUE);
GenerateRow1 (RED);
GenerateRow1 (GREEN);
GenerateRow1 (BLUE);
GenerateRow1 (YELLOW);
GenerateRow1 (WHITE);
}
void colorWipe(int color) { for (int i=0; i < leds.numPixels(); i++) { leds.setPixel(i, color); leds.show(); } }
void GenerateRow1(int color) {
for (int j=0; j<50; j++) // This loop lights all the LEDs in the row { for (int i=0; i < leds.numPixels(); i=i+100) // This loop is for each row; 12 rows of 50 LEDs; two rows at a time! { leds.setPixel(j+i, color); // the first row counts up (0-49) if (i+99-j < leds.numPixels())
leds.setPixel(i+99-j, color); // the next row counts backwards! (99-50)
leds.show(); } } }
My matrix consists of 12, 50 LED strings tied together; hence, 600 LEDs
This runs very, very slowly!! Other test programs run reasonably.
Any idea what could make it slow?
Thanks!
Bruce
Bruce Kahn West Chester, PA (610) 331 - 3503 <(610)%20331-3503>
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/LEDWall/issues/3#issuecomment-280483100, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZYhrBvlJ6UEucj3fFvyx9SqkWYXiKdks5rdM1-gaJpZM4MC-Rn .
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 <(604)%20259-9564> Mo: +1 (604) 916-2281 <(604)%20916-2281>
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 Mo: +1 (604) 916-2281
Sure, I’ll try that. However, even 50% faster would still be slow; it take about 43 seconds to wipe one color across the matrix !
On Feb 16, 2017, at 5:56 PM, Dan Royer notifications@github.com wrote:
then again, maybe I don't understand what you're trying to do.
a) slowly light one light at a time, or b) set all lights to one color
?
On Thu, Feb 16, 2017 at 2:54 PM, Dan Royer dan@marginallyclever.com wrote:
Try this, which unrolls the loops a bit and doesn't have the if() setPixel() that adds 33% more work.
define NUM_ROWS (12)
define NUM_COLS (50)
void GenerateRow1(int color) { int k=0;
for (int i=0; i<NUM_ROWS; i+=2) // This loop lights all the LEDs in the row { for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(k++, color); // the first row counts up (0-49) leds.show(); } k+=NUM_COLS; for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(--k, color); // the next row counts backwards! (99-50) leds.show(); } k+=NUM_COLS; } }
On Thu, Feb 16, 2017 at 2:28 PM, dirkblaze notifications@github.com wrote:
On Feb 16, 2017, at 11:42 AM, Dan Royer notifications@github.com wrote:
What did you try?
On Feb 16, 2017, at 4:51 AM, dirkblaze notifications@github.com wrote:
out
The following, and numerous variations:
include
const int ledsPerStrip = 600;
DMAMEM int displayMemory[ledsPerStrip6]; int drawingMemory[ledsPerStrip6];
const int config = WS2811_GRB | WS2811_800kHz;
OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
void setup() { leds.begin(); leds.show(); }
define GREEN 0xFF0000 // These RGBs are correct for our LEDs
define RED 0x00FF00
define BLUE 0x0000FF
define YELLOW 0xFFFF00
define PINK 0xFF1088åç
define ORANGE 0xE05800
define WHITE 0xFFFFFF
define BLACK 0x000000
void loop() {
GenerateRow1 (BLUE);
GenerateRow1 (RED);
GenerateRow1 (GREEN);
GenerateRow1 (BLUE);
GenerateRow1 (YELLOW);
GenerateRow1 (WHITE);
}
void colorWipe(int color) { for (int i=0; i < leds.numPixels(); i++) { leds.setPixel(i, color); leds.show(); } }
void GenerateRow1(int color) {
for (int j=0; j<50; j++) // This loop lights all the LEDs in the row { for (int i=0; i < leds.numPixels(); i=i+100) // This loop is for each row; 12 rows of 50 LEDs; two rows at a time! { leds.setPixel(j+i, color); // the first row counts up (0-49) if (i+99-j < leds.numPixels())
leds.setPixel(i+99-j, color); // the next row counts backwards! (99-50)
leds.show(); } } }
My matrix consists of 12, 50 LED strings tied together; hence, 600 LEDs
This runs very, very slowly!! Other test programs run reasonably.
Any idea what could make it slow?
Thanks!
Bruce
Bruce Kahn West Chester, PA (610) 331 - 3503 <(610)%20331-3503>
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/LEDWall/issues/3#issuecomment-280483100, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZYhrBvlJ6UEucj3fFvyx9SqkWYXiKdks5rdM1-gaJpZM4MC-Rn .
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 <(604)%20259-9564> Mo: +1 (604) 916-2281 <(604)%20916-2281>
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 Mo: +1 (604) 916-2281 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/LEDWall/issues/3#issuecomment-280490554, or mute the thread https://github.com/notifications/unsubscribe-auth/AVIp6pPicTuQcuhliK8voUwc3wo9060Kks5rdNQwgaJpZM4MC-Rn.
Bruce Kahn West Chester, PA (610) 331 - 3503
This was just a test, but “slowly" was nowhere in the objectives. Expecting something much, much, much faster. As noted, this take about 43 seconds to wipe one color across the matrix. Something is very wrong!
On Feb 16, 2017, at 5:56 PM, Dan Royer notifications@github.com wrote:
then again, maybe I don't understand what you're trying to do.
a) slowly light one light at a time, or b) set all lights to one color
?
On Thu, Feb 16, 2017 at 2:54 PM, Dan Royer dan@marginallyclever.com wrote:
Try this, which unrolls the loops a bit and doesn't have the if() setPixel() that adds 33% more work.
define NUM_ROWS (12)
define NUM_COLS (50)
void GenerateRow1(int color) { int k=0;
for (int i=0; i<NUM_ROWS; i+=2) // This loop lights all the LEDs in the row { for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(k++, color); // the first row counts up (0-49) leds.show(); } k+=NUM_COLS; for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(--k, color); // the next row counts backwards! (99-50) leds.show(); } k+=NUM_COLS; } }
On Thu, Feb 16, 2017 at 2:28 PM, dirkblaze notifications@github.com wrote:
On Feb 16, 2017, at 11:42 AM, Dan Royer notifications@github.com wrote:
What did you try?
On Feb 16, 2017, at 4:51 AM, dirkblaze notifications@github.com wrote:
out
The following, and numerous variations:
include
const int ledsPerStrip = 600;
DMAMEM int displayMemory[ledsPerStrip6]; int drawingMemory[ledsPerStrip6];
const int config = WS2811_GRB | WS2811_800kHz;
OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
void setup() { leds.begin(); leds.show(); }
define GREEN 0xFF0000 // These RGBs are correct for our LEDs
define RED 0x00FF00
define BLUE 0x0000FF
define YELLOW 0xFFFF00
define PINK 0xFF1088åç
define ORANGE 0xE05800
define WHITE 0xFFFFFF
define BLACK 0x000000
void loop() {
GenerateRow1 (BLUE);
GenerateRow1 (RED);
GenerateRow1 (GREEN);
GenerateRow1 (BLUE);
GenerateRow1 (YELLOW);
GenerateRow1 (WHITE);
}
void colorWipe(int color) { for (int i=0; i < leds.numPixels(); i++) { leds.setPixel(i, color); leds.show(); } }
void GenerateRow1(int color) {
for (int j=0; j<50; j++) // This loop lights all the LEDs in the row { for (int i=0; i < leds.numPixels(); i=i+100) // This loop is for each row; 12 rows of 50 LEDs; two rows at a time! { leds.setPixel(j+i, color); // the first row counts up (0-49) if (i+99-j < leds.numPixels())
leds.setPixel(i+99-j, color); // the next row counts backwards! (99-50)
leds.show(); } } }
My matrix consists of 12, 50 LED strings tied together; hence, 600 LEDs
This runs very, very slowly!! Other test programs run reasonably.
Any idea what could make it slow?
Thanks!
Bruce
Bruce Kahn West Chester, PA (610) 331 - 3503 <(610)%20331-3503>
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/LEDWall/issues/3#issuecomment-280483100, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZYhrBvlJ6UEucj3fFvyx9SqkWYXiKdks5rdM1-gaJpZM4MC-Rn .
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 <(604)%20259-9564> Mo: +1 (604) 916-2281 <(604)%20916-2281>
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 Mo: +1 (604) 916-2281 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/LEDWall/issues/3#issuecomment-280490554, or mute the thread https://github.com/notifications/unsubscribe-auth/AVIp6pPicTuQcuhliK8voUwc3wo9060Kks5rdNQwgaJpZM4MC-Rn.
Bruce Kahn West Chester, PA (610) 331 - 3503
so... the new code made no difference? what microcontroller are you using?
On Thu, Feb 16, 2017 at 3:04 PM, dirkblaze notifications@github.com wrote:
This was just a test, but “slowly" was nowhere in the objectives. Expecting something much, much, much faster. As noted, this take about 43 seconds to wipe one color across the matrix. Something is very wrong!
On Feb 16, 2017, at 5:56 PM, Dan Royer notifications@github.com wrote:
then again, maybe I don't understand what you're trying to do.
a) slowly light one light at a time, or b) set all lights to one color
?
On Thu, Feb 16, 2017 at 2:54 PM, Dan Royer dan@marginallyclever.com wrote:
Try this, which unrolls the loops a bit and doesn't have the if() setPixel() that adds 33% more work.
define NUM_ROWS (12)
define NUM_COLS (50)
void GenerateRow1(int color) { int k=0;
for (int i=0; i<NUM_ROWS; i+=2) // This loop lights all the LEDs in the row { for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(k++, color); // the first row counts up (0-49) leds.show(); } k+=NUM_COLS; for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(--k, color); // the next row counts backwards! (99-50) leds.show(); } k+=NUM_COLS; } }
On Thu, Feb 16, 2017 at 2:28 PM, dirkblaze notifications@github.com wrote:
On Feb 16, 2017, at 11:42 AM, Dan Royer notifications@github.com wrote:
What did you try?
On Feb 16, 2017, at 4:51 AM, dirkblaze notifications@github.com wrote:
out
The following, and numerous variations:
include
const int ledsPerStrip = 600;
DMAMEM int displayMemory[ledsPerStrip6]; int drawingMemory[ledsPerStrip6];
const int config = WS2811_GRB | WS2811_800kHz;
OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
void setup() { leds.begin(); leds.show(); }
define GREEN 0xFF0000 // These RGBs are correct for our LEDs
define RED 0x00FF00
define BLUE 0x0000FF
define YELLOW 0xFFFF00
define PINK 0xFF1088åç
define ORANGE 0xE05800
define WHITE 0xFFFFFF
define BLACK 0x000000
void loop() {
GenerateRow1 (BLUE);
GenerateRow1 (RED);
GenerateRow1 (GREEN);
GenerateRow1 (BLUE);
GenerateRow1 (YELLOW);
GenerateRow1 (WHITE);
}
void colorWipe(int color) { for (int i=0; i < leds.numPixels(); i++) { leds.setPixel(i, color); leds.show(); } }
void GenerateRow1(int color) {
for (int j=0; j<50; j++) // This loop lights all the LEDs in the row { for (int i=0; i < leds.numPixels(); i=i+100) // This loop is for each row; 12 rows of 50 LEDs; two rows at a time! { leds.setPixel(j+i, color); // the first row counts up (0-49) if (i+99-j < leds.numPixels())
leds.setPixel(i+99-j, color); // the next row counts backwards! (99-50)
leds.show(); } } }
My matrix consists of 12, 50 LED strings tied together; hence, 600 LEDs
This runs very, very slowly!! Other test programs run reasonably.
Any idea what could make it slow?
Thanks!
Bruce
Bruce Kahn West Chester, PA (610) 331 - 3503 <(610)%20331-3503> <(610)%20331-3503>
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/LEDWall/issues/3# issuecomment-280483100, or mute the thread https://github.com/notifications/unsubscribe-auth/ ABZYhrBvlJ6UEucj3fFvyx9SqkWYXiKdks5rdM1-gaJpZM4MC-Rn .
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 <(604)%20259-9564> <(604)%20259-9564> Mo: +1 (604) 916-2281 <(604)%20916-2281> <(604)%20916-2281>
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 <(604)%20259-9564> Mo: +1 (604) 916-2281 <(604)%20916-2281> — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/i-make-robots/LEDWall/issues/3#issuecomment-280490554>, or mute the thread https://github.com/notifications/unsubscribe-auth/ AVIp6pPicTuQcuhliK8voUwc3wo9060Kks5rdNQwgaJpZM4MC-Rn.
Bruce Kahn West Chester, PA (610) 331 - 3503 <(610)%20331-3503>
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/LEDWall/issues/3#issuecomment-280492452, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZYhqt2_K59bMSQK5HHlhJ8UXn52Yfoks5rdNXpgaJpZM4MC-Rn .
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 Mo: +1 (604) 916-2281
Haven’t tried it yet. Can’t right now. Will asap.
On Feb 16, 2017, at 6:26 PM, Dan Royer notifications@github.com wrote:
so... the new code made no difference? what microcontroller are you using?
On Thu, Feb 16, 2017 at 3:04 PM, dirkblaze notifications@github.com wrote:
This was just a test, but “slowly" was nowhere in the objectives. Expecting something much, much, much faster. As noted, this take about 43 seconds to wipe one color across the matrix. Something is very wrong!
On Feb 16, 2017, at 5:56 PM, Dan Royer notifications@github.com wrote:
then again, maybe I don't understand what you're trying to do.
a) slowly light one light at a time, or b) set all lights to one color
?
On Thu, Feb 16, 2017 at 2:54 PM, Dan Royer dan@marginallyclever.com wrote:
Try this, which unrolls the loops a bit and doesn't have the if() setPixel() that adds 33% more work.
define NUM_ROWS (12)
define NUM_COLS (50)
void GenerateRow1(int color) { int k=0;
for (int i=0; i<NUM_ROWS; i+=2) // This loop lights all the LEDs in the row { for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(k++, color); // the first row counts up (0-49) leds.show(); } k+=NUM_COLS; for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(--k, color); // the next row counts backwards! (99-50) leds.show(); } k+=NUM_COLS; } }
On Thu, Feb 16, 2017 at 2:28 PM, dirkblaze notifications@github.com wrote:
On Feb 16, 2017, at 11:42 AM, Dan Royer notifications@github.com wrote:
What did you try?
On Feb 16, 2017, at 4:51 AM, dirkblaze notifications@github.com wrote:
out
The following, and numerous variations:
include
const int ledsPerStrip = 600;
DMAMEM int displayMemory[ledsPerStrip6]; int drawingMemory[ledsPerStrip6];
const int config = WS2811_GRB | WS2811_800kHz;
OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
void setup() { leds.begin(); leds.show(); }
define GREEN 0xFF0000 // These RGBs are correct for our LEDs
define RED 0x00FF00
define BLUE 0x0000FF
define YELLOW 0xFFFF00
define PINK 0xFF1088åç
define ORANGE 0xE05800
define WHITE 0xFFFFFF
define BLACK 0x000000
void loop() {
GenerateRow1 (BLUE);
GenerateRow1 (RED);
GenerateRow1 (GREEN);
GenerateRow1 (BLUE);
GenerateRow1 (YELLOW);
GenerateRow1 (WHITE);
}
void colorWipe(int color) { for (int i=0; i < leds.numPixels(); i++) { leds.setPixel(i, color); leds.show(); } }
void GenerateRow1(int color) {
for (int j=0; j<50; j++) // This loop lights all the LEDs in the row { for (int i=0; i < leds.numPixels(); i=i+100) // This loop is for each row; 12 rows of 50 LEDs; two rows at a time! { leds.setPixel(j+i, color); // the first row counts up (0-49) if (i+99-j < leds.numPixels())
leds.setPixel(i+99-j, color); // the next row counts backwards! (99-50)
leds.show(); } } }
My matrix consists of 12, 50 LED strings tied together; hence, 600 LEDs
This runs very, very slowly!! Other test programs run reasonably.
Any idea what could make it slow?
Thanks!
Bruce
Bruce Kahn West Chester, PA (610) 331 - 3503 <(610)%20331-3503> <(610)%20331-3503>
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/LEDWall/issues/3# issuecomment-280483100, or mute the thread https://github.com/notifications/unsubscribe-auth/ ABZYhrBvlJ6UEucj3fFvyx9SqkWYXiKdks5rdM1-gaJpZM4MC-Rn .
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 <(604)%20259-9564> <(604)%20259-9564> Mo: +1 (604) 916-2281 <(604)%20916-2281> <(604)%20916-2281>
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 <(604)%20259-9564> Mo: +1 (604) 916-2281 <(604)%20916-2281> — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/i-make-robots/LEDWall/issues/3#issuecomment-280490554>, or mute the thread https://github.com/notifications/unsubscribe-auth/ AVIp6pPicTuQcuhliK8voUwc3wo9060Kks5rdNQwgaJpZM4MC-Rn.
Bruce Kahn West Chester, PA (610) 331 - 3503 <(610)%20331-3503>
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/LEDWall/issues/3#issuecomment-280492452, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZYhqt2_K59bMSQK5HHlhJ8UXn52Yfoks5rdNXpgaJpZM4MC-Rn .
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 Mo: +1 (604) 916-2281 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/LEDWall/issues/3#issuecomment-280497684, or mute the thread https://github.com/notifications/unsubscribe-auth/AVIp6pVokHVgd-9lcCXdmjdZT5XY9piNks5rdNsWgaJpZM4MC-Rn.
Bruce Kahn West Chester, PA (610) 331 - 3503
BTW, Isn’t this going to light all the LEDs row by row as opposed to column by column? Sort of 90 degrees different than my code, which lights all the LEDs a column at a time. Sorry, my comments might be misleading.
Thanks!
Bruce
void GenerateRow1(int color) {
int k=0; for (int i=0; i<NUM_ROWS; i+=2) // This loop lights all the LEDs in the row { for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(k++, color); // the first row counts up (0-49) leds.show(); }
k+=NUM_COLS;
for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row {
leds.setPixel(--k, color); // the next row counts backwards! (99-50)
leds.show();
}
k+=NUM_COLS;
} }
On Feb 16, 2017, at 6:26 PM, Dan Royer notifications@github.com wrote:
so... the new code made no difference? what microcontroller are you using?
On Thu, Feb 16, 2017 at 3:04 PM, dirkblaze notifications@github.com wrote:
This was just a test, but “slowly" was nowhere in the objectives. Expecting something much, much, much faster. As noted, this take about 43 seconds to wipe one color across the matrix. Something is very wrong!
On Feb 16, 2017, at 5:56 PM, Dan Royer notifications@github.com wrote:
then again, maybe I don't understand what you're trying to do.
a) slowly light one light at a time, or b) set all lights to one color
?
On Thu, Feb 16, 2017 at 2:54 PM, Dan Royer dan@marginallyclever.com wrote:
Try this, which unrolls the loops a bit and doesn't have the if() setPixel() that adds 33% more work.
define NUM_ROWS (12)
define NUM_COLS (50)
void GenerateRow1(int color) { int k=0;
for (int i=0; i<NUM_ROWS; i+=2) // This loop lights all the LEDs in the row { for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(k++, color); // the first row counts up (0-49) leds.show(); } k+=NUM_COLS; for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(--k, color); // the next row counts backwards! (99-50) leds.show(); } k+=NUM_COLS; } }
On Thu, Feb 16, 2017 at 2:28 PM, dirkblaze notifications@github.com wrote:
On Feb 16, 2017, at 11:42 AM, Dan Royer notifications@github.com wrote:
What did you try?
On Feb 16, 2017, at 4:51 AM, dirkblaze notifications@github.com wrote:
out
The following, and numerous variations:
include
const int ledsPerStrip = 600;
DMAMEM int displayMemory[ledsPerStrip6]; int drawingMemory[ledsPerStrip6];
const int config = WS2811_GRB | WS2811_800kHz;
OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
void setup() { leds.begin(); leds.show(); }
define GREEN 0xFF0000 // These RGBs are correct for our LEDs
define RED 0x00FF00
define BLUE 0x0000FF
define YELLOW 0xFFFF00
define PINK 0xFF1088åç
define ORANGE 0xE05800
define WHITE 0xFFFFFF
define BLACK 0x000000
void loop() {
GenerateRow1 (BLUE);
GenerateRow1 (RED);
GenerateRow1 (GREEN);
GenerateRow1 (BLUE);
GenerateRow1 (YELLOW);
GenerateRow1 (WHITE);
}
void colorWipe(int color) { for (int i=0; i < leds.numPixels(); i++) { leds.setPixel(i, color); leds.show(); } }
void GenerateRow1(int color) {
for (int j=0; j<50; j++) // This loop lights all the LEDs in the row { for (int i=0; i < leds.numPixels(); i=i+100) // This loop is for each row; 12 rows of 50 LEDs; two rows at a time! { leds.setPixel(j+i, color); // the first row counts up (0-49) if (i+99-j < leds.numPixels())
leds.setPixel(i+99-j, color); // the next row counts backwards! (99-50)
leds.show(); } } }
My matrix consists of 12, 50 LED strings tied together; hence, 600 LEDs
This runs very, very slowly!! Other test programs run reasonably.
Any idea what could make it slow?
Thanks!
Bruce
Bruce Kahn West Chester, PA (610) 331 - 3503 <(610)%20331-3503> <(610)%20331-3503>
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/LEDWall/issues/3# issuecomment-280483100, or mute the thread https://github.com/notifications/unsubscribe-auth/ ABZYhrBvlJ6UEucj3fFvyx9SqkWYXiKdks5rdM1-gaJpZM4MC-Rn .
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 <(604)%20259-9564> <(604)%20259-9564> Mo: +1 (604) 916-2281 <(604)%20916-2281> <(604)%20916-2281>
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 <(604)%20259-9564> Mo: +1 (604) 916-2281 <(604)%20916-2281> — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/i-make-robots/LEDWall/issues/3#issuecomment-280490554>, or mute the thread https://github.com/notifications/unsubscribe-auth/ AVIp6pPicTuQcuhliK8voUwc3wo9060Kks5rdNQwgaJpZM4MC-Rn.
Bruce Kahn West Chester, PA (610) 331 - 3503 <(610)%20331-3503>
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/LEDWall/issues/3#issuecomment-280492452, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZYhqt2_K59bMSQK5HHlhJ8UXn52Yfoks5rdNXpgaJpZM4MC-Rn .
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 Mo: +1 (604) 916-2281 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/LEDWall/issues/3#issuecomment-280497684, or mute the thread https://github.com/notifications/unsubscribe-auth/AVIp6pVokHVgd-9lcCXdmjdZT5XY9piNks5rdNsWgaJpZM4MC-Rn.
Bruce Kahn West Chester, PA (610) 331 - 3503
you'll have to try it and see.
On Thu, Feb 16, 2017 at 4:21 PM, dirkblaze notifications@github.com wrote:
BTW, Isn’t this going to light all the LEDs row by row as opposed to column by column? Sort of 90 degrees different than my code, which lights all the LEDs a column at a time. Sorry, my comments might be misleading.
Thanks!
Bruce
define NUM_ROWS (12)
define NUM_COLS (50)
void GenerateRow1(int color) {
int k=0; for (int i=0; i<NUM_ROWS; i+=2) // This loop lights all the LEDs in the row { for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(k++, color); // the first row counts up (0-49) leds.show(); }
k+=NUM_COLS;
for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row {
leds.setPixel(--k, color); // the next row counts backwards! (99-50) leds.show();
}
k+=NUM_COLS;
} }
On Feb 16, 2017, at 6:26 PM, Dan Royer notifications@github.com wrote:
so... the new code made no difference? what microcontroller are you using?
On Thu, Feb 16, 2017 at 3:04 PM, dirkblaze notifications@github.com wrote:
This was just a test, but “slowly" was nowhere in the objectives. Expecting something much, much, much faster. As noted, this take about 43 seconds to wipe one color across the matrix. Something is very wrong!
On Feb 16, 2017, at 5:56 PM, Dan Royer notifications@github.com wrote:
then again, maybe I don't understand what you're trying to do.
a) slowly light one light at a time, or b) set all lights to one color
?
On Thu, Feb 16, 2017 at 2:54 PM, Dan Royer <dan@marginallyclever.com
wrote:
Try this, which unrolls the loops a bit and doesn't have the if() setPixel() that adds 33% more work.
define NUM_ROWS (12)
define NUM_COLS (50)
void GenerateRow1(int color) { int k=0;
for (int i=0; i<NUM_ROWS; i+=2) // This loop lights all the LEDs in the row { for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(k++, color); // the first row counts up (0-49) leds.show(); } k+=NUM_COLS; for (int j=0; j<NUM_COLS; ++j) // This loop lights all the LEDs in the row { leds.setPixel(--k, color); // the next row counts backwards! (99-50) leds.show(); } k+=NUM_COLS; } }
On Thu, Feb 16, 2017 at 2:28 PM, dirkblaze < notifications@github.com> wrote:
On Feb 16, 2017, at 11:42 AM, Dan Royer <notifications@github.com
wrote:
What did you try?
On Feb 16, 2017, at 4:51 AM, dirkblaze < notifications@github.com> wrote:
out
The following, and numerous variations:
include
const int ledsPerStrip = 600;
DMAMEM int displayMemory[ledsPerStrip6]; int drawingMemory[ledsPerStrip6];
const int config = WS2811_GRB | WS2811_800kHz;
OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
void setup() { leds.begin(); leds.show(); }
define GREEN 0xFF0000 // These RGBs are correct for our LEDs
define RED 0x00FF00
define BLUE 0x0000FF
define YELLOW 0xFFFF00
define PINK 0xFF1088åç
define ORANGE 0xE05800
define WHITE 0xFFFFFF
define BLACK 0x000000
void loop() {
GenerateRow1 (BLUE);
GenerateRow1 (RED);
GenerateRow1 (GREEN);
GenerateRow1 (BLUE);
GenerateRow1 (YELLOW);
GenerateRow1 (WHITE);
}
void colorWipe(int color) { for (int i=0; i < leds.numPixels(); i++) { leds.setPixel(i, color); leds.show(); } }
void GenerateRow1(int color) {
for (int j=0; j<50; j++) // This loop lights all the LEDs in the row { for (int i=0; i < leds.numPixels(); i=i+100) // This loop is for each row; 12 rows of 50 LEDs; two rows at a time! { leds.setPixel(j+i, color); // the first row counts up (0-49) if (i+99-j < leds.numPixels())
leds.setPixel(i+99-j, color); // the next row counts backwards! (99-50)
leds.show(); } } }
My matrix consists of 12, 50 LED strings tied together; hence, 600 LEDs
This runs very, very slowly!! Other test programs run reasonably.
Any idea what could make it slow?
Thanks!
Bruce
Bruce Kahn West Chester, PA (610) 331 - 3503 <(610)%20331-3503> <(610)%20331-3503> <(610)%20331-3503>
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/LEDWall/issues/3# issuecomment-280483100, or mute the thread https://github.com/notifications/unsubscribe-auth/ ABZYhrBvlJ6UEucj3fFvyx9SqkWYXiKdks5rdM1-gaJpZM4MC-Rn .
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 <(604)%20259-9564> <(604)%20259-9564> <(604)%20259-9564> Mo: +1 (604) 916-2281 <(604)%20916-2281> <(604)%20916-2281> <(604)%20916-2281>
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 <(604)%20259-9564> <(604)%20259-9564> Mo: +1 (604) 916-2281 <(604)%20916-2281> <(604)%20916-2281> — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/i-make-robots/LEDWall/issues/3# issuecomment-280490554>, or mute the thread https://github.com/notifications/unsubscribe-auth/ AVIp6pPicTuQcuhliK8voUwc3wo9060Kks5rdNQwgaJpZM4MC-Rn.
Bruce Kahn West Chester, PA (610) 331 - 3503 <(610)%20331-3503> <(610)%20331-3503>
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/LEDWall/issues/3# issuecomment-280492452, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZYhqt2_ K59bMSQK5HHlhJ8UXn52Yfoks5rdNXpgaJpZM4MC-Rn .
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 <(604)%20259-9564> Mo: +1 (604) 916-2281 <(604)%20916-2281> — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/i-make-robots/LEDWall/issues/3#issuecomment-280497684>, or mute the thread https://github.com/notifications/unsubscribe- auth/AVIp6pVokHVgd-9lcCXdmjdZT5XY9piNks5rdNsWgaJpZM4MC-Rn.
Bruce Kahn West Chester, PA (610) 331 - 3503 <(610)%20331-3503>
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/i-make-robots/LEDWall/issues/3#issuecomment-280509747, or mute the thread https://github.com/notifications/unsubscribe-auth/ABZYhia5OZaGORJl2KD9LO2WW0otmOEDks5rdOgNgaJpZM4MC-Rn .
-- Dan Royer, Owner, Marginally Clever Robots https://www.marginallyclever.com/ Ph: +1 (604) 259-9564 Mo: +1 (604) 916-2281
What would make basicTest run slowly? Even after taking out the delays?