fixed math to map XY to corresponding LED