using the hardware serial on the UNO board I am able to connect by sending byte 85. the issue is printing text to the screen. each string has to be terminated with a ( 0 ). It seems the I am unable to send multiple bytes at one time. For example:
Serial.write("HelloWorld",0); // send HelloWorld to display
I get these error messages:
" SerialGLCD.ino:24: error: invalid conversion from 'const char*' to 'const uint8_t*'
SerialGLCD.ino:24: error: initializing argument 1 of 'virtual size_t Print::write(const uint8_t*, size_t)'
Error compiling"
Any help on this would be greatly appreciated.
Thanks
Charlie
Serial.write() usually sends one byte out the serial interface, you probably want to use the version that sends out arbitrary data. But even that interfaces needs a pointer to the data and it's length as parameters. What should your statement do? Printing the characters to the display? Why don't you use the print() method for that?
Thanks for the reply. When printing anything to the SGLCD the string has to be terminated with a null character. I tried using print instead of Serial.write, but the compiler still complains. any other ideas?
" Text strings are limited to 40 characters at a time and must be terminated with a null byte[0] "
That says NOTHING about you needing to send a NULL to the LCD.
That is directly from the SGLCD. it says the string has to be terminated with a Zero.
Of course, but I'm starting to have my doubts about it being possible for you.
Now Paul why the smart comments. I see you live is Washington. Let me guess... you are 15 living with a single parent and all you do is play with arduino and smoke weed. I just needed some clarification on a problem. I would appreciate if you don't have anything constructive to contribute then don't post on my thread.
That is directly from the SGLCD. it says the string has to be terminated with a Zero.
But, where does it say that you have to send an additional NULL/zero to the device? The NULL tells Serial.print() when to stop sending data. It does NOT result in Serial.print() sending a NULL anywhere.
Let me guess... you are 15 living with a single parent and all you do is play with arduino and smoke weed.
About as accurate as any other statement you've made so far. That is wrong on all assumptions.
Paul, the backpack document is a bit vague but it seems to imply that the backpack
wants to see a byte of zero to terminate the character string processing on the
backpack. It has nothing to do with the code running on the AVR.
Chaz,
As far as actually sending the extra 0 byte,