 
 void setup()
 {
+#if DEBUG
     Serial.begin(38400);
+#endif
 
     // Set motor pins as outputs
     pinMode(8, OUTPUT); 

// ---------------------------------------------
// debugging support stuff
// ---------------------------------------------

#define MAX 80
// debugging printf function. Max MAX characters per line!!
void dprintf(const char *fmt, ...)
{
    va_list va;
    va_start (va, fmt);
    char buffer[MAX];

            delay(d);
            duration -= d;
            t += d;
            
            // If the button is pressed during dispense, STOP!
            if (digitalRead(2) == LOW || digitalRead(3) == LOW)
            {
                digitalWrite(8, LOW);
                digitalWrite(9, LOW);
                digitalWrite(10, LOW);
                
                // Wait until no more buttons are pressed
                while(digitalRead(2) == LOW || digitalRead(3) == LOW)
                     ; 
                return;
            }
        }
        if (cmds[i].motor == 0)
            digitalWrite(8, LOW);
