mirror of
https://github.com/Makuna/NeoPixelBus.git
synced 2025-08-05 20:04:26 +02:00
Page:
NeoMosaic object
Pages
A method for resolving this
API Reference
Advanced Topics Tutorials
Color objects
Concentric Rings Support
DotStar Features
DotStar Methods
ESP32 DotStar Methods
ESP32 NeoMethods
ESP32 and RTOS Tasks
ESP8266 NeoMethods
Examples
FAQ #0
FAQ #1
FAQ #10
FAQ #11
FAQ #12
FAQ #2
FAQ #3
FAQ #4
FAQ #42
FAQ #5
FAQ #6
FAQ #7
FAQ #8
FAQ #9
FAQ
Home
HsbColor object API
HslColor object API
HtmlColor object API
Layout objects
LedSegment enum
Library Comercial Use
Library Comparisons
Matrix Panels Support
Nano 33 BLE NeoMethods
Neo Features
Neo Methods
NeoBitmapFile object API
NeoBitmapFile object
NeoBuffer object API
NeoBuffer object
NeoGamma object
NeoHueBlend objects
NeoMosaic object
NeoPixelAnimator object API
NeoPixelAnimator object
NeoPixelBrightnessBus object API
NeoPixelBrightnessBus object
NeoPixelBus object API
NeoPixelBus object
NeoPixelBusLg object API
NeoPixelBusLg object
NeoPixelSegmentBus object API
NeoPixelSegmentBus object
NeoTiles object
NeoTopology object
NeoVerticalSpriteSheet object API
NeoVerticalSpriteSheet object
Project References
Quick Start Guide
Quick Start Using One Wire LEDs
Quick Start Using Two Wire LEDs
Raster Image Support
Rgb16Color object API
Rgb48Color object API
RgbColor object API
Rgbw64Color object API
RgbwColor object API
RgbwwColor object API
SevenSegDigit object API
Smaller Code
Spiral Topography
T_COLOR_FEATURE
T_GAMMA
T_METHOD
Wiki Work List
enum AlarmAddError
enum AlarmPeriod
Clone
2
NeoMosaic object
Michael Miller edited this page 2016-03-24 10:29:32 -07:00
The NeoMosaic object is constructed with one layout "method" that provides the mapping from the 2d coordinate system to a index that the NeoPixelBus requires.
template <typename T_LAYOUT> class NeoMosaic
The T_LAYOUT will define how the pixels on an individual matrix panel are laid out. Orientation is ignored. See Layout objects for all the possible "methods".
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 a index and then use this to set a pixel color.
NeoPixelBus<NeoGrbFeature, Neo800KbpsMethod> strip(PixelCount, PixelPin);
NeoMosaic <RowMajorAlternatingLayout> 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 <ColumnMajorAlternatingLayout> mosaic(4, 4, 2, 2)
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<
NeoMosaic <RowMajorLayout> mosaic(4, 4, 2, 2)
0 1 2 3 4 5 6 7
-------------------------------------------------------------------
0 | 0< 1 2 3 19 23 27 31>
1 | 4 5 6 7 18 22 26 30
2 | 8 9 10 11 17 21 25 29
3 | 12 13 14 15> 16< 20 24 28
4 | 60 56 52 48< 47> 46 45 44
5 | 61 57 53 49 43 42 41 40
6 | 62 58 54 50 39 38 37 36
7 | 63> 59 55 51 35 34 33 32<