FastLED
3.9.15
Loading...
Searching...
No Matches
◆
XY()
uint16_t XY
(
uint8_t
x
,
uint8_t
y
)
Definition at line
31
of file
Noise.ino
.
32
{
33
uint16_t
i;
34
35
if
(
kMatrixSerpentineLayout
==
false
) {
36
i = (
y
*
kMatrixWidth
) +
x
;
37
}
38
39
if
(
kMatrixSerpentineLayout
==
true
) {
40
if
(
y
& 0x01) {
41
// Odd rows run backwards
42
uint8_t
reverseX = (
kMatrixWidth
- 1) -
x
;
43
i = (
y
*
kMatrixWidth
) + reverseX;
44
}
else
{
45
// Even rows run forwards
46
i = (
y
*
kMatrixWidth
) +
x
;
47
}
48
}
49
50
return
i;
51
}
y
int y
Definition
simple.h:93
x
int x
Definition
simple.h:92
kMatrixSerpentineLayout
#define kMatrixSerpentineLayout
Definition
NoisePlayground.h:18
kMatrixWidth
#define kMatrixWidth
Definition
SmartMatrixSketch.h:17
fl::uint16_t
fl::u16 uint16_t
Definition
s16x16x4.h:214
fl::uint8_t
unsigned char uint8_t
Definition
s16x16x4.h:209
References
kMatrixSerpentineLayout
,
kMatrixWidth
,
x
, and
y
.
examples
Noise
Noise.ino
Generated on Tue Jun 16 2026 00:07:00 for FastLED by
1.13.2