N18 colors swapped

Well, its been 3 years since my last “colors are swapped” post :slight_smile:

I just got an N18. Plugged it into both socket 5 and 6 on the Cerberus (3 years old board rev 1.1). NetMF 4.3 with R5 sdk and VS2013.

I used the sample code but switched the display object to the displayN18 instance.

        void ProgramStarted()
             this.displayN18.SimpleGraphics.DisplayEllipse(GT.Color.Red, 1, GT.Color.Red, 5, 5, 5, 5);
             this.displayN18.SimpleGraphics.DisplayLine(GT.Color.Blue, 1, 20, 20, 40, 40);
             this.displayN18.SimpleGraphics.DisplayText("Hello, World!", Resources.GetFont(Resources.FontResources.NinaB), GT.Color.Green, 60, 60);

Green is fine. Red and blue are swapped. (On my display, the circle is blue and the line is red. the text is green. I tried a green line too an that worked ok. So it looks like red and blue are swapped.

Bad code? Bad display? Bad mainboard?

Cheers, mark.

 Swaps the red and blue channels if your display has them reversed.


is this a workaround for some devices or can I permanently code this in? i.e. if I buy 10 N18 displays, will they all exhibit the same characteristic?

Cheers, Mark.

Some has it right, some are swapped. I wouldn’t hardcode it.

@ Markdav - Sadly there is no way to know for sure if a given display will be swapped until you get it. Your only option is to call the method Sprigo mentioned every time your program starts.

@ John - Hello John, I just developd a system for 9 differend devices all with displays, and ive found out that some of my displays have the channels swaped and some dont…

of course i can swap channels but as it only happens in some of them i would need to create a complete sw section only for the user to tellme if its wrong or not, and then swap them in case it is…

im interested about this Sprigo method you mention here, what exactly do you mean by that?

@ Ingcuervo -

See post by Sprigo above

My wife says the same! :naughty:

1 Like

@ willgeorge - LOL, sorry… i totally missunderstood, is not a sprigo called method, is a method mentioned by @ sprigo :smiley:

Of course i know about the swap colors method, i currently use it, but the point is that i have several diferent devices all of them with the same piece of software and i expected i didnt have to do different codes depending on 2 pieces of hardware that in theory should be identical… or at least very very similar.

so basically you are saying the only option is to create a piece of code with user interface asking the user WHICH color do you see here, and if its the wrong one, use the method, or if its the correct just dont use it? or did i understood something wrong?

ps: i dont want (if avoidable) to program each device wait until it starts and if its wrong, re program it with the correct code (including swap channels) and then continue

Ps2: do anyone knows why in gods name 2 different pieces of hardware that are supposed to be “identical”… are behaving different?

thanks for the help!

@ Ingcuervo - you could use an input pin and set it to 1 if inversion is necessary, or zero if not. You could then have one set of code which handles both cases based upon the setting of the pin. Of course, you would have to determine the pin state for each board one time.

@ andre.m -

And do not forget…

multicolorLed.GreenBlueSwapped = true; //needed for some multicolor led…

@ GHI - Can you please remove that and fix the driver appropriately in the next release? I’m embarrassed for you every time I have to explain this…

@ ianlee74 - this can’t be fixed and be embarrassed. We source the display from multiple sources and some are swapped, the others are not. We try to control this but unfortunately things in China runs in a very interesting way!

Oh… So, the issue is that you have multiple production runs of incompatible parts. Well, that does cause a problem. Still, I would think you would have that settled by now and the driver should reflect the parts you are currently selling. Or do you continue to sell mixed parts?

@ ianlee74 - it is still mixed but we understand this can be annoying and we are really trying to narrow it down to a single reliable source.

@ Gus - If displays within a batch are consistent, then it might be useful to put a sticker on those that require swapping. Or to make like easier, put a sticker explaining what to do if the color are reversed on every module.

1 Like

@ Mike - and why we didn’t think of this before! Good call. I will pass this on to production.