   writeRegister(pcaMode1, B00100000);
   writeRegister(pcaMode2, B00000100);
 }
-  
+
 void writeRegister(byte regAddress, byte regData) {
   Wire.beginTransmission(pcaBaseAddress);
   Wire.write(regAddress);

const char
  *singleOutput = "$%3d,%3d,%3d,%3d",
  *allOutputs = "#%3d,%3d,%3d";
int errorCount = 0;

void setup() {
  Serial.begin(57600);
  Wire.begin();
  setupDriver();
  for (byte output = 16; output-- > 0;)
    setOutputLevel(output, 0);
}

void loop() {
  char receiveBuffer[20];
  int output, red, green, blue;
  receiveBuffer[0] = 0;
  if (readLine(receiveBuffer, 1000)) {
    if (strlen(receiveBuffer) > 4) {

// This is done by copying the Wire library to the Arduino
// 'libraries' folder and editing the 'utility/twi.h' file.
#include <Wire.h>
#include <avr/pgmspace.h>

const byte
  pcaBaseAddress = 0x40,
