开云体育

ctrl + shift + ? for shortcuts
© 2025 Groups.io

LCMETER displaying wrong colours ?


 

Hi?

Have build the lcmeter bn49 and have the following screens

intro screen is black with white text
calibration should be green but its pink?
capacitor test is currently blue?
inductance test is currently red?

Has anyone encountered this error i tried tft library v16 abd 17? but no go so far?

seems some displays are organised bgr instead of rgb !?

73;s
Jason?
9H5BM


 

Jason,

You are right:? not all displays use the same RGB organization.? ?Here are three suggestions:

1). The simplest suggestion:? add the line
tft.invertDisplay(true);
to the bottom of the initDisplay() routine.? If you are very lucky, this single extra line will do the trick. If not, you will need to experiment and the fixes are more involved.


2) The next thing to try is changing the tft initialization.? Replace the line "tft.init()"? with one of the following;
??
tft.initR(INITR_BLACKTAB); ? ? ?// Init ST7735S chip, black tab
?- or -
tft.initR(INITR_GREENTAB); ? ? ?// Init ST7735S chip, green tab
?- or -
tft.initR(INITR_144GREENTAB);? ?// Init ST7735R chip, green tab


These three initializations account for the most common LCD varieties.


3)? If none of the above works, you can specify your desired colors as a 16-bit hex value.? Find the following lines in the code:

#define C_COLOR ? ? ? ?TFT_YELLOW ? ? ? ? ? ? // color for capacitance screen
#define L_COLOR ? ? ? ?TFT_CYAN ? ? ? ? ? ? ? // color for inductance screen
#define CAL_COLOR ? ? ?TFT_GREEN ? ? ? ? ? ? ?// color of calibration screen
#define STARTUP_COLOR ?TFT_WHITE ? ? ? ? ? ? ?// color of startup screen
#define BATT_COLOR ? ? TFT_WHITE ? ? ? ? ? ? ?// color of battery icon


and change the values to whatever 16-bit value produces the color you want.? ?For example, change the value of C_COLOR to TFT_BLUE (which won't be blue on your display) or 0xE9B2 or some other 16-bit value.? Feel free to experiment!


Bruce


On Mon, May 1, 2023 at 8:40?AM 9H5BM <jmcservv@...> wrote:
Hi?

Have build the lcmeter bn49 and have the following screens

intro screen is black with white text
calibration should be green but its pink?
capacitor test is currently blue?
inductance test is currently red?

Has anyone encountered this error i tried tft library v16 abd 17? but no go so far?

seems some displays are organised bgr instead of rgb !?

73;s
Jason?
9H5BM


 

Hi bruce

The invert display did the trick.

I have another issue - the screen is not starting at 0,0 and I have
1 line of pixels on top and 3 lines of pixels on the left side .

On Mon, May 1, 2023 at 3:01?PM Bruce Hall <bhall66@...> wrote:

Jason,

You are right: not all displays use the same RGB organization. Here are three suggestions:

1). The simplest suggestion: add the line
tft.invertDisplay(true);
to the bottom of the initDisplay() routine. If you are very lucky, this single extra line will do the trick. If not, you will need to experiment and the fixes are more involved.


2) The next thing to try is changing the tft initialization. Replace the line "tft.init()" with one of the following;

tft.initR(INITR_BLACKTAB); // Init ST7735S chip, black tab
- or -
tft.initR(INITR_GREENTAB); // Init ST7735S chip, green tab
- or -
tft.initR(INITR_144GREENTAB); // Init ST7735R chip, green tab

These three initializations account for the most common LCD varieties.


3) If none of the above works, you can specify your desired colors as a 16-bit hex value. Find the following lines in the code:

#define C_COLOR TFT_YELLOW // color for capacitance screen
#define L_COLOR TFT_CYAN // color for inductance screen
#define CAL_COLOR TFT_GREEN // color of calibration screen
#define STARTUP_COLOR TFT_WHITE // color of startup screen
#define BATT_COLOR TFT_WHITE // color of battery icon

and change the values to whatever 16-bit value produces the color you want. For example, change the value of C_COLOR to TFT_BLUE (which won't be blue on your display) or 0xE9B2 or some other 16-bit value. Feel free to experiment!


Bruce
w8bh.net


On Mon, May 1, 2023 at 8:40?AM 9H5BM <jmcservv@...> wrote:

Hi

Have build the lcmeter bn49 and have the following screens

intro screen is black with white text
calibration should be green but its pink
capacitor test is currently blue
inductance test is currently red

Has anyone encountered this error i tried tft library v16 abd 17 but no go so far

seems some displays are organised bgr instead of rgb !

73;s
Jason
9H5BM