A handy hint? or not. Blink without delay 3.0.

westfw:

if ((millis() & 0x1ff) == 0) {

Serial.println(data);
}

If your loop takes more than half a millisecond or so, won't you miss some of the times the last 9 bits of millis() are 0? It seems you'll have your println at some pseudo-random multiple of half a second.