From bda0f1e64a86e84af4eec765cd9f8975a8de758f Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Tue, 22 Mar 2016 17:13:23 -0700 Subject: [PATCH] Created NeoMosaic object (markdown) --- NeoMosaic-object.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 NeoMosaic-object.md diff --git a/NeoMosaic-object.md b/NeoMosaic-object.md new file mode 100644 index 0000000..3f53051 --- /dev/null +++ b/NeoMosaic-object.md @@ -0,0 +1,38 @@ +The NeoMosaic object is constructed with one layout "method" that provides the mapping from the 2d coordinate system to index that the NeoPixelBus requires. +``` +template class NeoMosaic +``` +The T_LAYOUT will define how the pixels on an individual matrix panel are laid out. Orientation is ignored. + +The NeoMosaic object will use its own layout for the matrix panels, and it will rotate the panels to shorten the interconnection distance between panels. + +Once you have constructed one, you can then use it map a given x,y to the index and use this set a pixel color. +``` +NeoPixelBus strip(PixelCount, PixelPin); +NeoMosaic mosaic( + PanelWidth, + PanelHeight, + TileWidth, + TileHeight); + +... +strip.SetPixelColor(mosaic.Map(4, 5), RgbColor(16,16,98)); + +``` + +Using the NeoPixelsMosaicDump.ino sample, the following are some example layouts. + +#### NeoMosaic \ mosaic() +``` + 0 1 2 3 4 5 6 7 + ------------------------------------------------------------------- + 0 | 0< 7 8 15> 16< 23 24 31> + 1 | 1 6 9 14 17 22 25 30 + 2 | 2 5 10 13 18 21 26 29 + 3 | 3 4 11 12 19 20 27 28 + 4 | 60 59 52 51 44 43 36 35 + 5 | 61 58 53 50 45 42 37 34 + 6 | 62 57 54 49 46 41 38 33 + 7 | 63> 56 55 48< 47> 40 39 32< + +``` \ No newline at end of file