FastLED
3.9.15
Loading...
Searching...
No Matches
◆
XY()
uint16_t XY
(
uint8_t
x
,
uint8_t
y
)
Definition at line
28
of file
Noise.ino
.
29
{
30
uint16_t i;
31
32
if
(
kMatrixSerpentineLayout
==
false
) {
33
i = (
y
*
kMatrixWidth
) +
x
;
34
}
35
36
if
(
kMatrixSerpentineLayout
==
true
) {
37
if
(
y
& 0x01) {
38
// Odd rows run backwards
39
uint8_t reverseX = (
kMatrixWidth
- 1) -
x
;
40
i = (
y
*
kMatrixWidth
) + reverseX;
41
}
else
{
42
// Even rows run forwards
43
i = (
y
*
kMatrixWidth
) +
x
;
44
}
45
}
46
47
return
i;
48
}
x
uint32_t x[NUM_LAYERS]
Definition
Fire2023.ino:80
y
uint32_t y[NUM_LAYERS]
Definition
Fire2023.ino:81
kMatrixSerpentineLayout
#define kMatrixSerpentineLayout
Definition
NoisePlayground.ino:23
kMatrixWidth
#define kMatrixWidth
Definition
SmartMatrix.ino:13
References
kMatrixSerpentineLayout
,
kMatrixWidth
,
x
, and
y
.
examples
Noise
Noise.ino
Generated on Fri Apr 18 2025 03:39:31 for FastLED by
1.13.2