Very first program, but terminal is acting weird.

07 Nov 2012

/media/uploads/wsjoukes/hello_world.tiff So I just wrote a little thing with this LPC1768 that flashes a LED and displays the message "Hello World!" in the Mac OSX terminal. Strangely, every time I reset the controller, the message shifts like in the picture

How does this happen? How can I fix it?

08 Nov 2012

Add a carriage return in addition to the newline at the end of the "Hello World!" string?

    printf("Hello World!\r\n");
08 Nov 2012

That seems to work great. Thanks a lot. But now I'm confused as to why a CR is completely unnecessary when coding cpp in something like xcode. I'm gonna guess that the new line command in standard c++ automatically includes it?

08 Nov 2012

It depends on your terminal program, and its settings !

my one ignores \n !!