Datasheet

opc = new OPC(this, "127.0.0.1", 7890);
opc.ledGrid8x8(0, width/2, height/2, height / 16.0, 0, false);
}
We made the window square, which is more convenient when we're working with a square
NeoMatrix. And while we're at it, we'll select the P3D renderer for Processing. This makes it
much faster at drawing images. Since we'll be drawing a large number of particles, this is
really important!
Next, we added the ledGrid8x8() command. This is a shortcut for creating 8x8 LED
matrices.
0 is the index number for the first LED in the matrix, since we connected this matrix to
output 0 on the Fadecandy board. If we were using output 1, we would start the
matrix at LED number 64.
width/2 and height/2 are the center of the matrix. We place it in the center of the
window.
height/16 is the spacing between LEDs. 16 is double the size of our matrix, so this
will make the matrix take up about half the height of the window.
0 is the rotation angle. We aren't rotating the matrix away from its default position, so
the first LED will be in the top-left corner.
false here states that the matrix does not zig-zag. Every row of LEDs points the same
direction.
These parameters, as well as the other LED mapping functions available, are all
documented in the OPC.pde reference (http://adafru.it/cW9).
You can try running the sketch. At this point, our window should be blank except for the
LED matrix:
© Adafruit Industries https://learn.adafruit.com/led-art-with-fadecandy Page 49 of 60