Hi. I have just got my touch screen working on my Mega 2560 using the library and code at http://www.rinkydinkelectronics.com and for some reason the code for the colours does not correspond to what is displayed... for example...
myGLCD.setColor(255, 0, 0);
displays Blue
myGLCD.setColor(0, 255, 0);
displays purple
myGLCD.setColor(0, 0, 255);
displays yellow
myGLCD.setColor(VGA_BLACK);
displays white
myGLCD.setColor(VGA_WHITE);
displays black
I mean... WTH??? :o
Has anyone come across this or know how to fix it? I'm guessing it is something in the library that I can tweak but I'm barely able to write sketches.
I had the same problem and put it down to the LCD. Not actually faulty, just made that way. To add insult to injury, the display width didn't work either. If the library came from the LCD supplier, it is reasonable to assume that that is the best bet for it.
You might find that everything is fixable, just say black when you want white. The numbers appear to be for CMY when it should be RGB. If the display width is dodgey too, you can probably fix it by adding numbers to the command, but this means that centred text will never work.
Yesssssss Nick... Nice one... CMY makes perfect sense now. Thanks mate, that's it. Not a problem, at least now I can work out colour codes. I find the width is a little dodgy too. Center don't work and all seems to be a little left. I just use numbers and manually play with it till it looks central.
I will try the other library Zaxarias, I imagine that the library will have the script telling how much Red, how much green and how much blue make up VGA_BLACK, WHITE, etc. hopefully your choice of library will work.
Notice that I used the word "appears". I didn't say CMY(K), I said CMY.
Getting the library from the same supplier did not actually save me. I did not bother to change libraries, as I fixed the situation myself and I like the Henning Karlsen library. I bought the display over a year before I used it, no link, and Cold Tears would not talk about it.
Steve does not have the same display as me, but he does have the same problem .
Nick_Pyner:
and Cold Tears would not talk about it.
mmmm did you mention Sainsmart?? They stop reading as soon as they see that word!! And then proceed to tell you Sainsmart is enemy and you deserve what you get and don't ask for help from them or Henning....... Jeez....... I only mentioned Sainsmart to say how shit they were and that was the thanks I got!!
LoL, no. I just wanted to understand what was going on but, by that time, they were no longer selling that display anyway. Henning Karlsen responded very quickly but suggested that, in the absence of any knowledge about the controller, his library was probably never specifically intended to work with that display in the first place. In short, I was probably lucky to have what I had.
It would be beneficial for others if you would share your findings instead of just saying thanks it's ok now. These threads are here indefinitely, and do appear in Google searches, your last post is not particularly informative.
It would also be good if you could edit the topic title in your first post to include [Solved] or (Closed) so people don't need to spend more time on this subject.