is this correct??

LS,

As I writing a sketch that can use different TFT screens.

To make the used name in the code the same I wanted to use this

#define BLACK       ST7735_BLACK       // 0x0000  ///<   0,   0,   0

But the compiler reporst BLACK not found.
Any suggestions?

Harry

HWD_Colours.h (4.49 KB)

Here are the 6 first lines of your file:

#if ENABLED(ST7735)
Written by Limor Fried / Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution
**************************************************** /
#define BLACK       ST7735_BLACK       // 0x0000  ///<   0,   0,   0
#define NAVY        ST7735_NAVY        // 0x000F  ///<   0,   0, 123

How do you think the compiler will understand lines number 2 and 3?

Try:

#if ENABLED(ST7735)
/**************************************************
Written by Limor Fried / Ladyada for Adafruit Industries.
MIT license, all text above must be included in any redistribution
***************************************************/
#define BLACK       ST7735_BLACK       // 0x0000  ///<   0,   0,   0
#define NAVY        ST7735_NAVY        // 0x000F  ///<   0,   0, 123

Thanks for the suggestion but it did not work. even removing all comment produces a new eror so I included all the code

QPSK19294.zip (11.4 KB)

******** / Oops.

You’re missing this #include "HWD_Colours.h"

No it isent.{code}#ifndef CONFIGURATION_H
#define CONFIGURATION_H

#define USETFT
#if ENABLED (USETFT)
#include "HWD_Colours.h"
#define USETFT 1

{facepalm}

Where was the error found?

Where do you think the #include should go?