2018-02-08 09:19:46 -08:00
|
|
|
/*
|
|
|
|
* 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 () => {
|
|
|
|
|
2018-02-11 19:56:44 -08:00
|
|
|
let mcp_chip = new MCP230XX({id:'mcp23008-27', address:0x26, bus:{host:'sbc'} })
|
2018-02-08 09:19:46 -08:00
|
|
|
|
|
|
|
await mcp_chip.init()
|
|
|
|
|
|
|
|
})().catch(err => {
|
|
|
|
console.error('FATAL: UNABLE TO START SYSTEM!\n',err)
|
|
|
|
})
|