This commit is contained in:
赵鑫 2022-09-01 13:58:41 +08:00
parent 23c1bca75f
commit 1197a942f5

View File

@ -60,7 +60,7 @@ function read_all_leds() {
const pixels = sense.getPixels()
for (let y = 0; y < 8; y++) {
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)