johnny-five
Version:
The JavaScript Robotics and Hardware Programming Framework. Use with: Arduino (all models), Electric Imp, Beagle Bone, Intel Galileo & Edison, Linino One, Pinoccio, pcDuino3, Raspberry Pi, Particle/Spark Core & Photon, Tessel 2, TI Launchpad and more!
44 lines (33 loc) • 863 B
JavaScript
module.exports = function(five) {
return (function() {
function Component(opts) {
if (!(this instanceof Component)) {
return new Component(opts);
}
// Board.Component
// - Register the component with an
// existing Board instance.
//
// Board.Options
// - Normalize incoming options
// - Convert string or number pin values
// to `this.pin = value`
// - Calls an IO Plugin's `normalize` method
//
five.Board.Component.call(
this, opts = five.Board.Options(opts)
);
// Define Component initialization
}
// Define Component Prototype
return Component;
}());
};
/**
* To use the plugin in a program:
*
* var five = require("johnny-five");
* var Component = require("component")(five);
*
*
*/