Open arsiesis opened 7 years ago
`
` добавил в файле mcp23017chip.html
` function mcp23017chipNode(n) { RED.nodes.createNode(this,n); this.addr = parseInt(n.addr, 16); this.interval = n.interval; this.dev = 0x01; this.dev = parseInt(n.dev, 16); //добавил чтение адреса порта i2c this.isInputs = 0x0000; this.pullUps = 0x0000; this.inverts = 0x0000; this.ids = new Array(16); this.lastRead = 0x0000; this.lastWrite = 0x0000;
this.i2c1 = i2cBus.openSync(this.dev);
` добавил в файле mcp23017chip.js
при конфигурации появится запрос номера i2c, вводить 0 или 1 открываться соответственно будет /dev/i2c-0 или /dev/i2c-1
Hello,
The Raspberry PI uses an special device name to connect to the I2C controller. Depending on the Raspberry PI version it can be one of the below values :
for the RPi Rev 1 it /dev/i2c-0
all Others it will be /dev/i2c-1 (=default).
It is also possible to use the /dev/i2c-0 with all Others PI by following for example this tutorial :
https://xdevs.com/article/adding-i2c0-port-raspberry-pi-b-rev-20/
We would therefore be able to connect 16x mcp23017 to a raspberry
Could you add this choice in the configuration ? Please...