 #else
   Firmata.begin(115200);
 #endif
+  //Firmata.begin(Serial);
 
   /* send digital inputs to set the initial state on the host computer,
    * since once in the loop(), this firmware will only send on change */
   for (i=0; i < TOTAL_PORTS; i++) {
-    outputPort(i, readPort(i, portConfigInputs[i]), true);
-  }
+    //outputPort(i, readPort(i, portConfigInputs[i]), true);
+  }
+  
+    
+  server.init();
   
   Serial.println("END SETUP");  
 }


  /* DIGITALREAD - as fast as possible, check for changes and output them to the
   * FTDI buffer using Serial.print()  */
  checkDigitalInputs();  

  /* SERIALREAD - processing incoming messagse as soon as possible, while still
   * checking digital inputs.  */
  while(Firmata.available())
    Firmata.processInput();

  /* SEND FTDI WRITE BUFFER - make sure that the FTDI buffer doesn't go over
   * 60 bytes. use a timer to sending an event character every 4 ms to

  //For this bank 0x78, the instrument does not matter, only the note
  //noteOn(0, note, 60);

  thePin = (thePin + 1) % 6;

  if (note < 60)
    server.readPin(thePin, 0);
  else if (note < 75)
    server.readPin(thePin, note);
  else
    server.readPin(thePin, 1024);
  //Note will dissapate automatically
  
  
