     digitalWrite(3, HIGH);
 }   
     
+//run all motors to clean the lines
+void clean()
+{
+    dprintf("cleaning!\n");
+    start_all();
+    while(digitalRead(2) == LOW && digitalRead(3) == LOW)
+        ;
+    stop_all();
+    dprintf("done cleaning! wait 2 seconds\n");
+    delay(2000);
+    dprintf("ready!\n");
+}
+   
 void loop()
 {    
+    uint8_t cleaned = 0;
+    
     dprintf("\nTequila Sunrise bot. What shall be your bidding?\n\n");
     for(;;)
     {

            }
        }
        if (cmds[i].motor == 0)
            digitalWrite(8, LOW);
        if (cmds[i].motor == 1)
            digitalWrite(9, LOW);
        if (cmds[i].motor == 2)
            digitalWrite(10, LOW);
    }
}


        delay(100);
        if (digitalRead(2) == LOW)
        {
            cleaned = 0;
            // wait for the button to be depressed         
            while(digitalRead(2) == LOW)
                 if (digitalRead(3) == LOW)
                 {
                      clean();
                      cleaned = 1;
                 }
                 
            if (!cleaned)
            {  
                dprintf("making normal drink\n");
                make_drink(3, drinks[0]);
                dprintf("drink complete. bottoms up!\n");
            }
        }
        if (digitalRead(3) == LOW)
        {
            // wait for the button to be depressed         
            cleaned = 0;
            // wait for the button to be depressed         
            while(digitalRead(3) == LOW)
                 if (digitalRead(2) == LOW)
                 {
                      clean();
                      cleaned = 1;
                 }
                 
            if (!cleaned)
            {     
                 dprintf("making strong drink\n");
                 make_drink(3, drinks[1]);
                 dprintf("drink complete. bottoms up!\n");
            }
        }
    }
}
