I bought an lcd from sparkfun and am using it to make a primitive game system. The thing is, the controller I'm using outputs a decimal number, and the lcd talks in hex. I managed to convert the numbers to hex all right, but my function creates two separate 'char' variables. Unfortunately, it won't work when I send this:
I already put the values into an array like Groove said, but my question was not how to contain the values together, but rather how to print all of those values in the same Serial.print() command. It's because my LCD doesn't understand if the values are sent separately, like did in my first example. I'm also sure it won't work if I do Serial.print(myvar[0-3], BYTE) because it would think I'm trying to say Serial.print(myvar[-3],BYTE).
Thank you for that. Unfortunately, my compiler is still being a pile of crap. This time, is says "invalid conversion from 'int' to 'cost char*.' Does anyone know how to fix this? Here's the code:
All right. I knew I made a mistake somewhere, but I couldn't figure out what it was. I'm still somewhat new to Arduino and this project is slightly more advanced than I'm used to. Anyway, I can't seem to get it to work, so I need some non-crappy code that will get this thing up-and-running. Can anyone help... again? The code is the same as my previous post.
I deleted the bad bit of code, but it still gave me the same error. In fact, the line it highlighted was not the Serial.print(), but the one with the sprintf(). Anyway, I am bothering you all once again to see if the great thinkers of Arduino can help out.
The code is the same as the last time I posted my whole program, except the 'BYTE' Serial.print(xValHex,BYTE) and Serial.print(yValHex,BYTE) has been deleted.