<commit_before>var util = require('util');
var os = require('os');
var bleno = require('eddystone-beacon/node_modules/bleno');
var eddystone = require('eddystone-beacon');

if (process.arch !== 'x64') {
  var five = require('johnny-five');
  var Edison = require('edison-io');
  var led;
  var board = new five.Board({ io: new Edison() });
  board.on('ready', function () {
    led = new five.Led('J19-6');
    led.on();
  });
  board.on('warn', function () {
    led.off();
  });
}

var name = 'PW_Coffee';
var url = 'https://google.fr';
bleno.on('stateChange', function (state) {
  console.log('on -> stateChange: ' + state);
  if (state === 'poweredOn') {
    bleno.startAdvertising();
    startBeacon();
  } else {
    bleno.stopAdvertising();
  }
});
bleno.on('advertisingStart', function (error) {
  console.log('on -> advertisingStart: ' + (error ? 'error ' + error : 'success'));
  if (error) {
    console.error('Can not start advertising');
    exit();
  }
});
function startBeacon() {
  console.log('Starting beacon.');
  var config = { 'name': name };
  eddystone.advertiseUrl(url, config);
}<commit_msg>Change URL and LED blinking.<commit_after>var util = require('util');
var os = require('os');
var bleno = require('eddystone-beacon/node_modules/bleno');
var eddystone = require('eddystone-beacon');
var five = require('johnny-five');
var Edison = require('edison-io');
var led = '';
var board = new five.Board({ io: new Edison() });
board.on('ready', function () {
  led = new five.Led('J19-6');
  led.on();
});
board.on('warn', function () {
  led.off();
});
var name = 'PW_Coffee';
var url = 'https://goo.gl/TWmm3H';
bleno.on('stateChange', function (state) {
  console.log('on -> stateChange: ' + state);
  if (state === 'poweredOn') {
    bleno.startAdvertising();
    startBeacon();
  } else {
    bleno.stopAdvertising();
  }
});
bleno.on('advertisingStart', function (error) {
  console.log('on -> advertisingStart: ' + (error ? 'error ' + error : 'success'));
  if (error) {
    console.error('Can not start advertising');
    exit();
  }
});
function startBeacon() {
  console.log('Starting beacon.');
  var config = { 'name': name };
  eddystone.advertiseUrl(url, config);
  led.off();
  led.blink();
}
{'fraction_non_alphanumeric': 0.2033213644524237, 'fraction_numerical': 0.004039497307001795, 'mean_word_length': 4.042986425339366, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '6685004', 'n_tokens_mistral': 800, 'n_tokens_neox': 764, 'n_words': 171}