• You want a monitor that shows you what the actual LEDs are... for example:

    • you loaded the LED string with following colors RRRG GBBB BYYY YYWW
    • your 'box' should show 'exactly' the same sequence of colors in some way

    I you have a display - such as in the project, you can assign a spot of, for example, 3x3 pixel for each of the LED and when the colors are sent out, you also set the spots with the colors...

    There may be some timing challenges, because that would be quite a lot of code you run through to set the spots on the display. If you go native on the display - sending commands to the display controller - you may overcome this by shifting by one zone and add the new zone at the beginning. The display controller does the shifting very efficient, and you have to set only the new spot. Quite a nice programming challenge...

    If I understood it too literally, you may just give an indicator on the display which of the color has been chosen and all LEDs will eventually blending to. For that you modify the code and highlight that color (put a border around the spot, and of course, clear the one from the previously displayed color). The modification of the code would go into the step() function, a piece after each of these lines:

        colFrom = colTo;
        colTo = cols[(Math.random()*cols.length)|0];
    

    Below first of mentioned lines (and before second one), you clear the marking border for the colFrom (you just draw the rectangle with the colFrom with fillRect(...)).

    Below the second of mentioned lines, you draw a black, white, and again black rectangle on the outermost, second and third outermost dots of the colTo block (drawRect(...)). Choosing nested rectangles highlight clearly which color is blended to next, no matter what the colTo color is and what the surroundings are on the display...

About

Avatar for allObjects @allObjects started