examples/dothat/bar_graph.js
function setEnabledStateOfLed(callback) {
    var index = 0;
    
    var setEnabledStateOfLedInterval = setInterval(function() {
        if (index <= 5) {
            dothat.barGraph.setEnabledStateOfLed(index, false);
            
            index++;
        } else {
            clearInterval(setEnabledStateOfLedInterval);
            
            if (callback) {
                callback();
            }
        }
    }, 500);
}
function setEnabledStateOfLed(callback) {
    var index = 0;
    
    var setEnabledStateOfLedInterval = setInterval(function() {
        if (index <= 5) {
            dothat.barGraph.setEnabledStateOfLed(index, false);
            
            index++;
        } else {
            clearInterval(setEnabledStateOfLedInterval);
            
            if (callback) {
                callback();
            }
        }
    }, 500);
}
function setEnabledStateOfLed ( callback ) { var index = 0 ; var setEnabledStateOfLedInterval = setInterval ( function ( ) { if ( index <= 5 ) { dothat . barGraph . setEnabledStateOfLed ( index , false ) ; index ++ ; } else { clearInterval ( setEnabledStateOfLedInterval ) ; if ( callback ) { callback ( ) ; } } } , 500 ) ; }
Sets the enabled state of each individual LED in the bar graph.
@param {Function} callback A function to call when the operation has finished.
Sets the enabled state of each individual LED in the bar graph .