Serial read loop not reading \n

IIRC the IDE never sends an '\n' as it is the trigger to know when to send.

you could try to replace the \n with # instead and see if that works...