UNPKG

johnny-five

Version:

The JavaScript Arduino Programming Framework.

49 lines (28 loc) 1.07 kB
# Tinkerkit Continuous Servo Run with: ```bash node eg/tinkerkit-continuous-servo.js ``` ```javascript var five = require("johnny-five"); new five.Board().on("ready", function() { var servo = new five.Servo({ pin: "O0", type: "continuous" }); new five.Sensor("I0").scale(0, 1).on("change", function() { servo.cw(this.value); }); }); ``` ## Breadboard/Illustration ![docs/breadboard/tinkerkit-continuous-servo.png](breadboard/tinkerkit-continuous-servo.png) - [TinkerKit Servo](http://www.tinkerkit.com/servo/) - [TinkerKit Linear Potentiometer](http://www.tinkerkit.com/linear-pot/) - [TinkerKit Shield](http://www.tinkerkit.com/shield/) ## Contributing All contributions must adhere to the [Idiomatic.js Style Guide](https://github.com/rwldrn/idiomatic.js), by maintaining the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt](https://github.com/cowboy/grunt). ## License Copyright (c) 2012 Rick Waldron <waldron.rick@gmail.com> Licensed under the MIT license.