Character Display Module - Return Code

Hi All,

Can someone tell me how to return and go to the next line on the Character Display Module.

URL: https://www.ghielectronics.com/docs/171/character-display-module

I have tried filling with white space but it doesn’t work if I change the text. WOW this feels like a silly question! I cant find anything related to this. \N \n\r \ none of the string return variables work as far as I can see.


char_Display.PrintString("Hello World!" + NewLine + "Hello ChrisO");

Thanks!

All the Best

Chris

character displays don’t respond to ascii strings like that. You have to use multiple statements, and use SetCursor between the PrintStrings to move to the correct position you want the subsequent text to appear.

Edit: and you can see the driver source http://gadgeteer.codeplex.com/SourceControl/latest#Main/Modules/GHIElectronics/Display_HD44780/Software/Display_HD44780/Display_HD44780_42/Display_HD44780_42.cs to see what happens behind the scenes if you care !

1 Like

Thanks Brett,

I used:


// Display the Text...
char_Display.PrintString("Hello World! ");

// Move to the next Line, position zero...
char_Display.SetCursor(1, 0);

// Display the Text...
char_Display.PrintString("Hello ChrisO");

This does the trick nicely.

All the Best

Chris