setAddrWindow)_

Hi,
I'm using MCUFRIEND_kbv library to control my 3.5 inch tft module.
I'm having troubles drawing shapes in colors other than white and black.
for an example, i attached a picture for what i get (for a red rectangle).
So, after digging the library i came across a function called setAddrWindow and i can't figure what is it that it do.

So, my general question is what that functios does?
another question is if someone know how to fix that bug.

by the way, i managed to draw shapes by using drawPixel function, but its too slow and the user can see the drawing proccess

Look at the graphictest_kbv sketch. Use ctrl-F to search for "setAddrWindow"
Most users will never need it.

I can't see your picture.
If you want a solid Red rectangle, you use fillRect()
If you just want an outline, you use drawRect()

Likewise with circles, triangles, ...
You build complex shapes by drawing the primitive graphics like line, rectangle, circle, ...

David.

Hi,
I'm using MCUFRIEND_kbv library to control my 3.5 inch tft module.
I'm having troubles drawing shapes in colors other than white and black.
for an example, this is what i get (for a red rectangle):

So, after digging the library i came across a function called setAddrWindow and i can't figure what is it that it do.

So, my general question is what that functios does?
another question is if someone know how to fix that bug.

by the way, i managed to draw shapes by using drawPixel function, but its too slow and the user can see the drawing proccess

Hi,
I accidently post the same post twice.
Using the functions you have mentioned, i get shapes that looks like that:

What library version do you have?

Update your library with the Library Manager.

It looks like you have a 9488_555 display.

David.

Ok
Tomorrow morning I'll try and post here the result
Thanks

smarthings:
I accidently post the same post twice.

Use Report to moderator.

Threads merged.

smarthings:
Ok
Tomorrow morning I'll try and post here the result
Thanks

I have updated the library and the problem is gone. Thank you very much.

Sorry, I didn't know that. Learned for next time. thanks

Which old library version did you have?

Was my guess correct? i.e. ID = 0x9488 (9488_555 hardware problem)

David.

I don’t know the ID, but this is the file name: MCUFRIEND_kbv-2.9.3

The library version would have been v2.9.3
The controller ID is reported on the Serial Terminal with most of my examples.

David.

So, after deleting the library and install the old one, you were right! it was ID = 0x9488. :slight_smile: