<commit_before>var five = require("johnny-five");
var Particle = require("particle-io");
var board = new five.Board({
  io: new Particle({
    token: '9fadc82e938b06a4c102d598e9434505d34d9d64',
    deviceId: '210021000247343138333038'
  })
});

board.on("ready", function() {
  var rightWheel = new five.Motor({
  	pins: {
  		pwm: "D0",
  		dir: "D4"
  	},
  	invertPWM: true
  });

  var leftWheel = new five.Motor({
  	pins: {
  		pwm: "D1",
  		dir: "D5"
  	},
  	invertPWM: true
  });

  var speed = 255;

  function forward() {
  	leftWheel.fwd(speed);
  	rightWheel.fwd(speed);
  }

  function reverse() {
  	leftWheel.rev(speed);
  	rightWheel.rev(speed);
  }

  function stop() {
  	leftWheel.stop();
  	rightWheel.stop();
  }

  function right() {
  	leftWheel.rev(speed);
  	rightWheel.fwd(speed);
  }

  function left() {
  	leftWheel.fwd(speed);
  	rightWheel.rev(speed);
  }

  var stdin = process.stdin;
  stdin.setRawMode(true);
  stdin.resume();

  var keyMap = {
  	'up': reverse,
  	'down': forward,
  	'left': left,
  	'right': right,
  	'space': stop
  };

  stdin.on('keypress', function(chunk, key) {
  	if(!key || !keyMap[key.name]) return;

  	console.log(key.name);<commit_msg>WE CAN OPEN AND CLOSE!<commit_after>var five = require("johnny-five");
var Particle = require("particle-io");
var board = new five.Board({
  io: new Particle({
    token: '9fadc82e938b06a4c102d598e9434505d34d9d64',
    deviceId: '210021000247343138333038'
  })
});

board.on("ready", function() {
  var rightWheel = new five.Motor({
  	pins: {
  		pwm: "D0",
  		dir: "D4"
  	},
  	invertPWM: true
  });

  var leftWheel = new five.Motor({
  	pins: {
  		pwm: "D1",
  		dir: "D5"
  	},
  	invertPWM: true
  });

  var speed = 255;

  function forward() {
  	leftWheel.fwd(speed);
  	rightWheel.fwd(speed);
  }

  function reverse() {
  	leftWheel.rev(speed);
  	rightWheel.rev(speed);
  }

  function stop() {
  	leftWheel.stop();
  	rightWheel.stop();
  }

  function right() {
  	leftWheel.rev(speed);
  	rightWheel.fwd(speed);
  }

  function left() {
  	leftWheel.fwd(speed);
  	rightWheel.rev(speed);
  }



var servo = new five.Servo({
    id: "MyServo",     // User defined id
    pin: "A4",           // Which pin is it attached to?
    type: "standard"  // Default: "standard". Use "continuous" for continuous rotation servos
        // Default: 0-180
});

  function open()
  {
  	servo.to(40);
  }

  function close()
  {
  	servo.to(90);
  }
  // Sweep from 0-180 and repeat.
 // servo.sweep([0,10]);



  var stdin = process.stdin;
  stdin.setRawMode(true);
  stdin.resume();

  var keyMap = {
  	'up': reverse,
  	'down': forward,
  	'left': left,
  	'right': right,
  	'space': stop,
  	'insert': open,
  	'delete': close
  };

  stdin.on('keypress', function(chunk, key) {
  	console.log(key);
  	if(!key || !keyMap[key.name]) return;

  
{'fraction_non_alphanumeric': 0.16660833041652082, 'fraction_numerical': 0.046202310115505775, 'mean_word_length': 2.8778833107191315, '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': '3324953', 'n_tokens_mistral': 1295, 'n_tokens_neox': 1180, 'n_words': 224}