Go Down

Topic: extra chars displayed at end (Read 745 times) previous topic - next topic


Code: [Select]
I am using an analog value to index through and array and display messages
on the sparkfun serial LCD

Everything works except I get extra || ||| every time

Got any ideas?

I attached some of the code, it's big.


prog_char string_16[] PROGMEM = "16 Dulcimer";

PROGMEM const char *string_table[] =    // change "string_table" name to suit

strcpy_P(buffer, (char*)pgm_read_word(&(string_table[instrument]))); // Necessary casts and dereferencing, just copy.
   Serial.println( buffer );
    delay( 500 );


that's probably the newline character at the end of the string.  Strip off the "\n" at the end and the |||s will go away.


Strip off the "\n" at the end and the |||s will go away.

You do this by using Serial.print() instead of Serial.println().  You will have to reposition the cursor to advance to the next line unless your particular serial device uses some other technique.

Please use the code button only for the code portions of your post.  You have used it for your entire post.



I guess they are end of line character as well. Splarfun Serial LCD doesn't know how to handle it. You have to handle it yourself or maybe should have bought my version of serial LCD that does handle everything ;)
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter


Thanks for the help, Serial.print worked. I will work on my posting skills for next time.

Go Up