18 lines
373 B
JavaScript
18 lines
373 B
JavaScript
/*
|
|
* i2c bus with both unix and tcp socket using defaults. For TCP that is host OS name and port 8080
|
|
*
|
|
*/
|
|
import MCP230XX from '../src/mcp230xx-packet'
|
|
// const PATH = ''
|
|
|
|
;
|
|
(async () => {
|
|
|
|
let relays = new MCP230XX({id:'relays', address:0x27, bus:{host:'sbc'} })
|
|
|
|
await relays.init()
|
|
|
|
})().catch(err => {
|
|
console.error('FATAL: UNABLE TO START SYSTEM!\n',err)
|
|
})
|