Serial debug output looking messy
This is unfortunately not valid in C++:

"test" + millis()


Rather than concatenating two strings, it's actually doing pointer arithmetic. It's taking the memory address where "test" is stored, and offsetting by the value retrieved from millis(). The result is a totally arbitrary memory location which gets treated like a string.

Generally speaking, it's arguably best to avoid string concatenation on Arduino anyway unless absolutely necessary. The reason is that it can use more memory than you might expect.

A simpler approach would simply be to do the serial output as a sequence of individual operations, e.g.:

Serial.print( "test" );
Serial.println( millis() );


Note the difference between print() and println(). The first one doesn't add a line break at the end, but the second one does.