2017-08-22 03:52:27 +00:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
const gpio = require('gpio')
|
|
|
|
|
|
|
|
class Intval {
|
|
|
|
constructor () {
|
|
|
|
this._pin = {}
|
|
|
|
this._declarePins()
|
|
|
|
}
|
|
|
|
_declarePins () {
|
|
|
|
this._pin.four = gpio.export(4, {
|
|
|
|
direction: 'out',
|
|
|
|
interval: 100,
|
|
|
|
ready : () => {
|
|
|
|
console.info(`Set pin 4 to OUTPUT`)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
2017-08-22 04:00:24 +00:00
|
|
|
status () {
|
|
|
|
return {}
|
|
|
|
}
|
2017-08-22 03:52:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = new Intval()
|