17 lines
354 B
JavaScript
17 lines
354 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'
|
|
|
|
;
|
|
(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)
|
|
})
|