The basic answer is do not loop inside of the loop() routine in a 'normal' arduino style sketch, write your loop routine as if
void loop() {
// do your thing
}actually meant
while(1) {
//...