diff --git a/public/index.html b/public/index.html index f7dacce..2c57fd0 100644 --- a/public/index.html +++ b/public/index.html @@ -147,9 +147,11 @@ } client.on('leds', (array) => { const leds = document.querySelectorAll('.led') - for (let i = 0; i < 64; i++) { - if (array[i] == 1) leds[i].classList.add('on') - else leds[i].classList.remove('on') + for (let y = 0; y < 8; y++) { + for (let x = 0; x < 8; x++) { + if (array[y][x] == 1) leds[i].classList.add('on') + else leds[i].classList.remove('on') + } } })