Step 10: Chaining the lamps
Put the first cable into the second small cable hole of the master lamp. Solder one strand to the Arduinos SDA pin (Analog pin4), I used the yellow strand of my cable for this. One strand (the white one in my case) goes to the SCL pin (Analog pin5).
Use two of the strands to connect the 230V line (I connected four (two each) to lower the resistance and because my cable has 8 strands). Connect the remaining strands and the cable shield to GND.
Do not forget to add the cork stand to the lamp before connecting the cable to the next lamp!
Put the other end of the cable into the slave lamp number 1. Connect in the same way: the 230V lines go obviously to the 12V power supply (note: all the power supplies are connected in parallel, not in series!), all the GND lines (and the shielding) are connected to the GND of the slave controller PCB. The SDA and SCL lines go to the PCB as well, look at the picture in step 7 (or the schematic) to see which one is which.
Now it's time to do some testing. Uncomment the updatelamp(1); lines you commented earlier from the code. Upload it to the master lamp and switch it on (you can leave your PC connected to the lamp even if it is on).
You may have to debug at this point, I sure as hell had to. If the slave lamp is not working, check the communication lines with an oscilloscope and see if there are any signals present. If there are, try lowering the I2C speed in the code by changing "TWI_FREQ 400000L" to 100kHz. Values below 50kHz did not work for me.
If this does not help either, check the GND connection and while you are at it, check if you accidentally switched the SDA and SCL lines. If this also does not help, disconnect the slave from the SDA and SCL lines and re-upload the code to the slave and make sure you compile it with the right slave address (it is 0x11 for slave number one).
If the lamp is still not doing what is should, use the Serial.println() command in the master lamp code to check what is going on in the software (does the code work as expected? are commands sent? are they sent successfully? does the slave lamp acknowledge the commands?). If all works, it is not a software nor a communication problem. Check the hardware connections of the slave lamp. You can unhook the PWM signal cables from the led drivers, the lamp should then light up in bright white. If not, double check the wiring (all connected right? no short circuits?)
If it still is not working, you are on your own.
Take the next cable and hook up slave number 2 in the same way. Continue until all the lamps are connected like a chain.
Congratulations, you now have a working chained mood-light.
All that is left is to close up the lamps and put on the cover glass to the reflector.
When closing the lamps, be careful that none of the wires get in the way of the fan. It may be necessary to fix some of the cables to the wooden bowls or even shorten them. Once everything fits, use a few drops of wood glue to fix the two halves of the lamps together. If necessary, use bar clamps to fix while drying.
Now use a soft cloth or paper towels to carefully clean the reflector from dust, fingerprints or whatever you may have gotten in there. Also clean the glass covers (I used window cleaner and alcohol) as well as possible. In the bright LED light, even the tiniest particles will be visible.
Use transparent adhesive (I used silicone) to glue the glass covers onto the reflector.
Set the lamps up in your living room and enjoy!