 int alertTimer;
 
 void sendEnergy() {
+  if(SERIAL_DEBUG) Serial.println("send energy");
   char c = ENERGY;
   for (int i=0; i<3; i++) bus[i]->write(c);
   addTimer(100, sendEnergy);

  
  // start sending energy if we're a source
  if (isSource) addTimer(100, sendEnergy);
}

void loop() {
  if (isSource) {
    if (!digitalRead(button1pin)) {
      char c = ALERT; 
      for (int i=0; i<3; i++) bus[i]->write(c);
    }

  // check all lines for incoming data
  for (int i=0;i<3;i++) if(bus[i]->available()) {
    char c = bus[i]->read();
    if(SERIAL_DEBUG) Serial.println("received: "+c);
    switch(c) {
      case ALERT: // button is pressed
        if (!isSource && !alertState) {
