日時 | |
関係者(共同研究者) | |
キノマクリエイトのアナゴル-デジタル変換サンプルコード(JS6)
Kinoma Tutorial - Getting Started with Analog
http://kinoma.co…
exports.pins = {
analog: { type: "Analog" }
};
exports.configure = function() {
this.analog.init();
}
exports.close = function() {
this.analog.close()
}
exports.read = function() {
return this.analog.read();
}
var Pins = require("pins");
Pins.configure({
analogSensor: {
require: "BLL-NAME-HERE", //"Analog" if using the built-in BLL
pins: {
analog: { pin: 54 }
}
}
}, success => {
if (success) {
Pins.repeat("/analogSensor/read", 20, result => {
// do something with result
});
}
});