/* jshint undef: true, node: true, eqeqeq: true, esnext: true */

var strip = require('rpi-ws281x-native');
strip.init(32);
strip.setBrightness(100);

var leds = [
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0xff0000    
];

strip.render(leds);
var interval = setInterval(function() {
    console.log('Rendering!');
    var led = leds.shift();
    leds.push(led);
    strip.render(leds);
}, 100);

setTimeout(function () {
    console.log('Stop!');
    clearInterval(interval);
    strip.reset();
}, 10000);

@@ -59,16 +59,41 @@
 rue */%0A%0A
+var NUMBER_OF_LEDS = 32;%0A
 var stri
@@ -137,18 +137,30 @@
 ip.init(
-32
+NUMBER_OF_LEDS
 );%0Astrip
@@ -280,15 +280,8 @@
 ,0,0
-xff0000
     
@@ -289,144 +289,382 @@
 %5D;%0A%0A
-strip.render(leds);%0Avar interval = setInterval(function() %7B%0A    console.log('Rendering!');%0A    var led = leds.shift();%0A    leds.push(led
+// Loop every 0.1 sec: randomise an index and a colour and display it%0Astrip.render(leds);%0Avar interval = setInterval(function() %7B%0A    var randomIndex = Math.floor(Math.random() * NUMBER_OF_LEDS);%0A    var randomColour = Math.floor(Math.random() * 0xffffff);%0A    leds%5BrandomIndex%5D = randomColour;%0A    console.log('Rendering colour ' + randomColour + ' at index ' + randomIndex
 );%0A 
@@ -696,16 +696,44 @@
  100);%0A%0A
+// After 10 secondes, stop.%0A
 setTimeo

Fix random colour generation.