UNPKG

opengpio

Version:

A performant c++ based general purpose GPIO controller for linux devices. OpenGPIO is written using libgpiod, line & chip based abstractions.

13 lines (11 loc) 366 B
import { NanoPi_NEO3, Edge } from '../src'; console.log('Watch error test'); const pin = NanoPi_NEO3.output(NanoPi_NEO3.bcm.GPIO0_D3); setInterval(() => { console.log('Watching the same pin again'); try { const pin = NanoPi_NEO3.output(NanoPi_NEO3.bcm.GPIO0_D3); } catch (e) { console.log('Should catch as JS error', e); } }, 2000);