var Board = require("../");

Board.requestPort(function(error, port) {
  if (error) {
    console.log(error);
    return;
  }
  var board = new Board(port.comName);

  board.on("ready", function() {
    var pin = 3;

    console.log("Ready.");

    this.pinMode(pin, this.MODES.PULLUP);
    this.pinMode(pin, this.MODES.INPUT);
    this.digitalRead(pin, function(value) {
      console.log(value);
    });
  });
});
