Hi,
I hereby can confirm that running 2 programs of MCP23017 with a different domainname is not working (for me?)
Altough a previous post (
http://www.homegenie.it/forum/index.php?topic=145.msg771#msg771) is confirming that creating 2 programs with a different domain, is working, I hardly doubt this is possible : for me it seems very logic, that when you run 2 programs asynchronically creating each a different Driver and a driverConnection, they will use the same bus together at the very same moment (not knowing of each other who comes first) which will result in conflicts.
For example :while one program is polling for data, the other might try to send configurations of a chip (startup). Of course they are targetting a different adres (driverConnection : 0x20 and 0x21) but they are using the same bus (Driver) which might be busy sending or receiving data from the other program.
Of course I poll every 100ms while the Original program polls only every 500ms. Maybe this generates more traffic on the bus but I hardly doubt that setting a poll rate of 500 ms will never result in conflicts....
So I did some duplications in Gene's code of the MCP23017 and now both chips are working fine and stable. In this code you only use one Driver and two driverConnections to a different adress (0x20 and 0x21) which seems more logic as in one program the code runs sequencely it is impossible to use both driverConnections at the same time (as long as you don't use an AsyncTask)
I also added a Get.Status tot the API so you can request the status of all 32 pins using API calls.
If there are still bugs in the new program, feel free to let me know.