You are reading a single comment by @allObjects and its replies. Click here to read the full conversation.
  • Can you take a pic of what you see with the unchanged code and share it in the forum?

    Your code creates something looking like on the right in the screen shot I attached... assuming the display you have is configured 240 pixels horizontal in the x-axis and 320 pixels vertical in the y-axis with x=0 and y=0 being left-top corner.

    You have 50 lights and the code creates a bar of 3 pixels wide for each of the LEDs, which makes 150 pixels... just by co-using the fact that every third byte in the Uint8Array is the begin of a new LED.

    My suggested changes take the full width into account - 240 pixels - which makes it possible to have a 4 pixels wide vertical bar for each LED building a large horizontal bar. Furthermore, the suggested changes allow to use the vertical - 320 pixels - which makes it possible to have a 6 pixels high horizontal bar for each LED building a large vertical bar. The changes in the begin use the Orientation information - "x" or "y" axis - and the WX width and HY height to calculate the maximal width or height for each bar given 50 LEDs and 240 or 320 pixels.

    If this is not what you get, then we are not talking the same language, or may be not the same hardware...

About

Avatar for allObjects @allObjects started