GPIO 05 works with pulldown resistor

Now try with built in watch command
This commit is contained in:
mmcwilliams 2017-09-16 15:09:29 -04:00
parent 28810e761d
commit d2e5c0f998
1 changed files with 4 additions and 4 deletions

View File

@ -6,13 +6,13 @@ const btn = Gpio(5, 'in', 'both')
console.log('Watching input on GPIO 05')
/*btn.watch((err, val) => {
btn.watch((err, val) => {
if (err) {
return console.error(err)
}
console.log(val)
})*/
})
setInterval(() => {
/*setInterval(() => {
console.log(btn.readSync())
}, 1000)
}, 1000)*/