
Originally Posted by
MatrixWriter
Now for the part I would like some help on for the project:
1) I could not find any documentation on the forum or site on this:
How many LEDs can the Teensy 3.1 fit on each pin? Can each pin (I call it channel) do 96 LEDs in a row?
Teensy 3.0 is recommended for up to 1000 LEDs, and 3.1 up to 4000 (though 3.1 is quite new and 4000 is untested).
For 1000 LEDs on 8 pins, that's 125 per pin.
2) I understand that the OctoWS2811 is designed to run 8 strips of LEDs of equal length.
Just for ease of the project, should I buy
8 Teensy microcontrollers and assign the each row of LEDs it's own pin on the Teensy. Ex: Row #1 goes to LED 1, Row #2 goes to LED 2, and so on.
Presumably you're asking about the VideoDisplay & movie2serial example that comes with OctoWS2811?
It's well documented on the OctoWS2811 page. Scroll down to "VideoDisplay Example Program".
Or do I want to have some of the rows "serpentine" to the next one? Wouldn't this make the video display complicated or does the library know how to do this?
This stuff is explained on the web page. Please look again. This image shows the recommended ways to connect more than 1 row to each pin:

You set LED_LAYOUT to indicate if the rows begin left to right, or right to left. If the width of the display is shorter than the strip length, then movie2serial assumes a multiple row zig-zag arrangement, as shown in this image.
Please, re-read the web page. It's all explained in detail.
These comments from the VideoDisplay code have the more info:
Code:
// The actual arrangement of the LEDs connected to this Teensy 3.0 board.
// LED_HEIGHT *must* be a multiple of 8. When 16, 24, 32 are used, each
// strip spans 2, 3, 4 rows. LED_LAYOUT indicates the direction the strips
// are arranged. If 0, each strip begins on the left for its first row,
// then goes right to left for its second row, then left to right,
// zig-zagging for each successive row.
#define LED_WIDTH 60 // number of LEDs horizontally
#define LED_HEIGHT 16 // number of LEDs vertically (must be multiple of 8)
#define LED_LAYOUT 0 // 0 = even rows left->right, 1 = even rows right->left
// The portion of the video image to show on this set of LEDs. All 4 numbers
// are percentages, from 0 to 100. For a large LED installation with many
// Teensy 3.0 boards driving groups of LEDs, these parameters allow you to
// program each Teensy to tell the video application which portion of the
// video it displays. By reading these numbers, the video application can
// automatically configure itself, regardless of which serial port COM number
// or device names are assigned to each Teensy 3.0 by your operating system.
#define VIDEO_XOFFSET 0
#define VIDEO_YOFFSET 0 // display entire image
#define VIDEO_WIDTH 100
#define VIDEO_HEIGHT 100
//#define VIDEO_XOFFSET 0
//#define VIDEO_YOFFSET 0 // display upper half
//#define VIDEO_WIDTH 100
//#define VIDEO_HEIGHT 50
//#define VIDEO_XOFFSET 0
//#define VIDEO_YOFFSET 50 // display lower half
//#define VIDEO_WIDTH 100
//#define VIDEO_HEIGHT 50
The actual code that transforms ordinary pixels into the format for OctoWS2811 is in movie2serial. Here's the relevant code:
Code:
// image2data converts an image to OctoWS2811's raw data format.
// The number of vertical pixels in the image must be a multiple
// of 8. The data array must be the proper size for the image.
void image2data(PImage image, byte[] data, boolean layout) {
int offset = 3;
int x, y, xbegin, xend, xinc, mask;
int linesPerPin = image.height / 8;
int pixel[] = new int[8];
for (y = 0; y < linesPerPin; y++) {
if ((y & 1) == (layout ? 0 : 1)) {
// even numbered rows are left to right
xbegin = 0;
xend = image.width;
xinc = 1;
} else {
// odd numbered rows are right to left
xbegin = image.width - 1;
xend = -1;
xinc = -1;
}
for (x = xbegin; x != xend; x += xinc) {
for (int i=0; i < 8; i++) {
// fetch 8 pixels from the image, 1 for each pin
pixel[i] = image.pixels[x + (y + linesPerPin * i) * image.width];
pixel[i] = colorWiring(pixel[i]);
}
// convert 8 pixels to 24 bytes
for (mask = 0x800000; mask != 0; mask >>= 1) {
byte b = 0;
for (int i=0; i < 8; i++) {
if ((pixel[i] & mask) != 0) b |= (1 << i);
}
data[offset++] = b;
}
}
}
}
This stuff is all on the website or in the actual code.