Strange class problem

I don't know what the function dbg does but I imagine it "prints" out characters over the serial link. My guess is that the UART isn't initialized yet. Try commenting out the dbg function calls in the constructor of DMX_RGB.