mikewitney:
sorry guys this isnt working im getting the errors no matter what i try
im going to approach it from another direction
and yes i have tried all the options above
Have you established what tft.fillScreen actually does ?
To me it still (see reply #2) seems to be a function that fills the screen with a given colour rather than reading the current colour of the screen and in any case needs brackets after its name hence the error message you got
invalid use of member function (did you forget the '()' ?)
UKHeliBob:
Have you established what tft.fillScreen actually does ?
To me it still (see reply #2) seems to be a function that fills the screen with a given colour rather than reading the current colour of the screen and in any case needs brackets after its name hence the error message you got
invalid use of member function (did you forget the '()' ?)
What do you get if you do
Serial.println(tft.fillScreen());
no matching function for call to 'Adafruit_ILI9341::fillScreen()
it wont let me do it
so yes ur correct... thanks for that. i would have been at this for ages
i am still new to all this arduino stuff i've come from IOS dev to this as i had an adea i'm just trying to put this idea together.. once i have this system up and running it will be controlled by an IOS & Android app which i already have ready to go.. this is my first Arduino adventure.
and believe be just to get the hardware its cost me over £350 as i keep buying stuff and finding out its no good so a buy something else to replace it
i started with a raspberry pi then on to a Arduino uno then moved to a Arduino Mega.
i have 3 screens 2 of which are now spare. and much more
just to get where i am now
but hey at least i can build more stuff afterwards LOL
Can you please post a complete copy of your sketch, using code tags?
If your sketch is too big, use REPLY rather than QUICK REPLY and it has an attachment facility, so you can post your sketch as an attachment, but try code tags first.
No, you can't. Perhaps you should try explaining what you are really trying to do. Then, we can offer suggestions.
If what you are trying to do is determine the screen color, I have to wonder why that is necessary. Only YOU assign the color. Simply remember which color is currently assigned, and base your decisions on that.
In the OP's other thread on the subject he explains what he is trying to do, ie determine which screen is being shown when the user presses a virtual button on the screen.
His worry is that the user will press a button, the screen will change and the same button press will be detected on the second screen. I suggested that he needs to detect when the button becomes pressed rather than is pressed (sound familiar ?) but he seems to have chosen to ignore that advice and seek another way to do it by detecting the current screen based on its colour.
mikewitney:
no matching function for call to 'Adafruit_ILI9341::fillScreen()
it wont let me do it
so yes ur correct… thanks for that. i would have been at this for ages
i am still new to all this arduino stuff i’ve come from IOS dev to this as i had an adea i’m just trying to put this idea together… once i have this system up and running it will be controlled by an IOS & Android app which i already have ready to go… this is my first Arduino adventure.
and believe be just to get the hardware its cost me over £350 as i keep buying stuff and finding out its no good so a buy something else to replace it
i started with a raspberry pi then on to a Arduino uno then moved to a Arduino Mega.
i have 3 screens 2 of which are now spare. and much more
just to get where i am now
but hey at least i can build more stuff afterwards LOL
Open whatever TFT library x.h you are using in any text editor.
find method / function fillScreen
read the function description / brief - if it has one
see what parameters does it requires - most likely int RGB colors AKA fillScreen(R, G, B);
does the function returns anything - I doubt it.
BLACK MAY be a #define 255,255,255 - check that
Your problem has nothing to do which what hardware you are using , nothing to do with brackets , nothing to do with if() etc,…
You are using the function incorrectly and the compiler told you that.
The syntax is incorrect and if the function does not return anything checking for == BLACK is pointless.
It ALWAYS helps to actually open the “library” file - ( it is ALL Open source ) source code to verify how the function you are trying to use works.