Skip to content

Latest commit

 

History

History
66 lines (36 loc) · 1012 Bytes

nodeconf-slider.md

File metadata and controls

66 lines (36 loc) · 1012 Bytes

Nodeconf Slider

Run with:

node eg/nodeconf-slider.js
var five = require("johnny-five"),
    board, slider, servo, scalingRange;

board = new five.Board();

board.on("ready", function() {

  slider = new five.Sensor({
    pin: "A0",
    freq: 50
  });

  // log out the slider values to the console.
  slider.on("slide", function( err, value ) {
    if ( err ) {
      console.log( "error: ", err );
    } else {
      console.log( Math.floor(this.value) );
    }
  });
});

Breadboard

Devices

Documentation

(Nothing yet)

Contributing

All contributions must adhere to the Idiomatic.js Style Guide, by maintaining the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Release History

(Nothing yet)

License

Copyright (c) 2012 Rick Waldron waldron.rick@gmail.com Licensed under the MIT license.