If you want a bit more help, you'll probably have to describe a bit more your project and your problem with it.
Apparently in this piece of code you don't even share data via I2C bus.
Are you trying to display things on LCD ? "if (displays.indexOf('A') > -1) {digitalWrite(A, HIGH);}"
What are the two devices you try to connect together ?
If it is a pc it is probably much simpler to establish a serial connection via usb.