You are reading a single comment by @Mrbbp and its replies. Click here to read the full conversation.
  • Hello,

    i'm playing with self soldered ws2812 strip (neopixel like from ebay)
    i've use the solution with the open drain (330ohm between DIN and 5v) - color have changed
    but i've got strange behavior.
    I'm working with pattern repeated on the strip...
    if i switchOn only on led on my pattern , there is two led ligthed up one purple, one green...
    i've tried some things like decay rbg value in the rgb array, but it's not that...
    any idea...
    Where i'm bad?
    thanks for your idea...

    é.

    var tGauss = new Uint8ClampedArray(9);
    var rgb = new Uint8ClampedArray(20*3);
    
    tGauss = [0,0,0,0,255,0,0,0,0];
    
    console.log(rgb);
    // animation chenillard
    function anime() {
    	// pour espruino
    	for (var i = 0; i < Math.ceil(rgb.length/3); i++) {
    		rgb[(i*3)+0] = tGauss[i%tGauss.length];
    		rgb[(i*3)+1] = tGauss[i%tGauss.length];
    		rgb[(i*3)+2] = tGauss[i%tGauss.length];
            console.log(rgb[(i*3)],rgb[(i*3)+1],rgb[(i*3)+2]);
    	}
    	require("neopixel").write(B15, rgb );
    	decalage++;
    }
    
    function onInit() {
    	USB.setConsole();
        pinMode(B15, 'af_opendrain');
    	setInterval( anime, 500);
    }
    
About

Avatar for Mrbbp @Mrbbp started