FastLED
3.10.8
Loading...
Searching...
No Matches
◆
XY()
uint16_t XY
(
uint8_t
x
,
uint8_t
y
)
Definition at line
37
of file
Noise.ino
.
38
{
39
uint16_t
i;
40
41
if
(
kMatrixSerpentineLayout
==
false
) {
42
i = (
y
*
kMatrixWidth
) +
x
;
43
}
44
45
if
(
kMatrixSerpentineLayout
==
true
) {
46
if
(
y
& 0x01) {
47
// Odd rows run backwards
48
uint8_t
reverseX = (
kMatrixWidth
- 1) -
x
;
49
i = (
y
*
kMatrixWidth
) + reverseX;
50
}
else
{
51
// Even rows run forwards
52
i = (
y
*
kMatrixWidth
) +
x
;
53
}
54
}
55
56
return
i;
57
}
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
.
dox
dox
fastled
examples
Noise
Noise.ino
Generated on Thu Oct 22 2026 05:45:57 for FastLED by
1.13.2