Skip to content

Latest commit

 

History

History
65 lines (36 loc) · 931 Bytes

motor-EVS_NXT.md

File metadata and controls

65 lines (36 loc) · 931 Bytes

Motor - EVShield NXT

Run with:

node eg/motor-EVS_NXT.js
var five = require("johnny-five");
var board = new five.Board();

board.on("ready", function() {
  var motor = new five.Motor({
    controller: "EVS_NXT",
    pin: "BBM2",
  });

  board.wait(2000, function() {
    console.log("REVERSE");

    motor.rev();

    // Demonstrate motor stop in 2 seconds
    board.wait(2000, function() {
      motor.stop();
    });
  });

  console.log("FORWARD");
  motor.fwd();
});
<iframe width="560" height="315" src="https://www.youtube.com/embed/WLMTxiHOWHM" frameborder="0" allowfullscreen></iframe>

 

License

Copyright (c) 2012, 2013, 2014 Rick Waldron waldron.rick@gmail.com Licensed under the MIT license. Copyright (c) 2014, 2015 The Johnny-Five Contributors Licensed under the MIT license.