From d2e5c0f99812aa8bd32f9a98e0e6d285aaae104c Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Sat, 16 Sep 2017 15:09:29 -0400 Subject: [PATCH] GPIO 05 works with pulldown resistor Now try with built in watch command --- tests/gpio.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/gpio.js b/tests/gpio.js index 5638932..56d4a76 100644 --- a/tests/gpio.js +++ b/tests/gpio.js @@ -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) \ No newline at end of file +}, 1000)*/ \ No newline at end of file