update
This commit is contained in:
parent
23c1bca75f
commit
1197a942f5
@ -60,7 +60,7 @@ function read_all_leds() {
|
|||||||
const pixels = sense.getPixels()
|
const pixels = sense.getPixels()
|
||||||
for (let y = 0; y < 8; y++) {
|
for (let y = 0; y < 8; y++) {
|
||||||
for (let x = 0; x < 8; x++) {
|
for (let x = 0; x < 8; x++) {
|
||||||
leds[y][x] = sense.getPixel(x, y) == [0, 0, 0] ? 0 : 1
|
leds[y][x] = sense.getPixel(x, y)[2] == 0 ? 0 : 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(leds)
|
console.log(leds)
|
||||||
|
Loading…
Reference in New Issue
Block a user