Open jsammarco opened 6 years ago
I have tried these changes and still have an issue with the last LED in the strip.
module.exports = function(width, height) {
var map = new Uint16Array((width*height)+2);//One for extra LED offset
for(var i = 0; i<map.length+1; i++) {
var row = Math.floor(i/width), col = i % width ;
if((row % 2) === 0) {
map[i+1] = i;
} else {
map[i+1] = (row+1) * width - (col+1);
}
}
//map[599] = 55;//(width*height)-width+1;
//map[0] = 999;
//map[600] = 525;
map[0] = 999;
map[601] = 524;
//map[(width*height)-width-1] = (row+1) * width - (col+1);
console.log(map);
return map;
};
Hi, I have an LED that is not part of my grid and I have offset it in my alternating-matrix.
ws281x.setIndexMapping(alt_matrix(75,8));
I have text scrolling great but my issue is my 601st led is just yellow and doesnt respond. I tried to manually adjust the array to fix it and just no luck. Here is my code. -Thanks great workalternating-matrix.js