TWI allows multiple devices to communicate on the same bus. Just two wires are required…you don’t need to dedicate Arduino pins to every separate device. This takes place on analog pins 4 (serial data) and 5 (serial clock). Newer “R3” Arduino boards also include distinct SDA and SCL pins serving the same functions, though analog pins 4 and 5 still work too.
In order to distinguish among multiple devices on the bus, each must be assigned a unique numeric address. Most devices (sensors, etc.) are factory-configured for one specific address, but others (like these LED backpacks) are at least partially configurable. There’s a default address (0x70 in hexadecimal notation) which can then be tweaked by joining some solder pads on the back of the board:
But there’s only four addresses, and we have five matrices! So we’ll use a small compromise here: both eyes will always point the same direction and blink together…no winking or crossed eyes. To do this, we just use the same address for both — they’ll receive and display the exact same data in unison. (And that’s all there is to that…sorry if you were expecting a more technical procedure!)
The three mouth matrices are then each assigned a unique address, separate from the “eyes” address. Here’s the view from the back:
Notice we’re not using the DC power jack on the Arduino. Each of these displays can draw up to 200 milliamps (when fully lit), and the 5V regulator on the Arduino is only rated up to 500 mA. It could handle one or two of these displays (e.g. if only using the eyes), but the full face requires more current than this.
The buttons are optional — one of the example sketches (“wavface”) works together with a Wave Shield, and these are used to trigger sounds. A simpler example (“roboface”) does not require the Wave Shield or the buttons.
The three mouth matrices were tacked together with a bit of hot-melt glue. For the wires, an unused mounting hole on the Proto Shield was used as a strain relief attachment point, so anything pulling on the wires will put pressure here and not on the solder connections.