You are reading a single comment by @DrAzzy and its replies. Click here to read the full conversation.
  • Gordon's example is for a 5x6 array (30 LEDs) so he makes a uint8array 90 bytes long (30 LEDs 3 bytes per LED). The outer loop loops over each of the 5 rows, and the inner loop goes over each LED within those rows, setting the three colors in it. X and Y are the coordinates of the LED it's addressing.

    If you only have 8 in a single row, you'd create a 24 byte long uint8array (3 bytes per LED), and you'd want to adjust the two loops appropriately (ie, change the tests to y<1 and x <8 )


Avatar for DrAzzy @DrAzzy started