GPIO 05 works with pulldown resistor
Now try with built in watch command
This commit is contained in:
parent
28810e761d
commit
d2e5c0f998
|
@ -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)*/
|
Loading…
Reference in New Issue