examples/dot3k/bar_graph.js
function setBrightnessOfLed(callback) {
    var ledIndex = 8;
    
    var setBrightnessOfLedInterval = setInterval(function() {
        if (ledIndex >= 0) {
            dot3k.barGraph.setBrightnessOfLed(ledIndex, 0);
            
            ledIndex--;
        } else {
            clearInterval(setBrightnessOfLedInterval);
            
            if (callback) {
                callback();
            }
        }
    }, 500);
}
function setBrightnessOfLed(callback) {
    var ledIndex = 8;
    
    var setBrightnessOfLedInterval = setInterval(function() {
        if (ledIndex >= 0) {
            dot3k.barGraph.setBrightnessOfLed(ledIndex, 0);
            
            ledIndex--;
        } else {
            clearInterval(setBrightnessOfLedInterval);
            
            if (callback) {
                callback();
            }
        }
    }, 500);
}
function setBrightnessOfLed ( callback ) { var ledIndex = 8 ; var setBrightnessOfLedInterval = setInterval ( function ( ) { if ( ledIndex >= 0 ) { dot3k . barGraph . setBrightnessOfLed ( ledIndex , 0 ) ; ledIndex -- ; } else { clearInterval ( setBrightnessOfLedInterval ) ; if ( callback ) { callback ( ) ; } } } , 500 ) ; }
Sets the brightness of each individual LED.
@param {Function} callback A function to call when the operation has finished.
Sets the brightness of each individual LED .