<commit_before><commit_msg>control LED via pull-down resistor circuit.<commit_after>var j5      = require('johnny-five'),
    arduino = new j5.Board();

arduino.on('ready', function(){
    var strobeEnabled = false;
    var led = new j5.Led({
        // the pin to apply a voltage.
        pin: 13
    });
    var button = new j5.Button({
        // input pin
        pin: 2,
        // minimum time to emit 'hold' event.
        holdtime: 1000
    });

    button.on('up', function(){
        console.log('button - released');
        if (strobeEnabled) {
            led.stop();
            led.off();
            strobeEnabled = false;
        } else {
            led.toggle();
        }
    });

    button.on('hold', function(){
        console.log('button - hold');
        strobeEnabled = true;
        led.strobe(100);
    });
});
{'fraction_non_alphanumeric': 0.1466030989272944, 'fraction_numerical': 0.0166865315852205, 'mean_word_length': 1.7184466019417475, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6113066', 'n_tokens_mistral': 262, 'n_tokens_neox': 248, 'n_words': 63}