Please test this. There may be a silly error with the passing of the color. I have updated the method to pass the color correctly.
add this to your code. Test and let me know the result.
#defineGLCDDrawCharmyGLCDDrawChar_ST7735'''Draws a character at the specified location on the ST7920 GLCD'''@paramStringLocXXcoordinateformessage'''@param CharLocY Y coordinate for message'''@paramCharsStringtodisplay'''@param LineColour Line Color, either 1 or 0Sub myGLCDDrawChar_ST7735(In CharLocX, In CharLocY, In CharCode, Optional In LineColour as word = GLCDForeground ) 'CharCodeneedstohave16subtracted,tablestartsatchar16notchar0CharCode-=15'Need to read characters from CharColn (n = 0:7) tables '(First3,ie0:2areblank,socanignore)ForCurrCharCol=1to5SelectCaseCurrCharColCase1:ReadTableGLCDCharCol3,CharCode,CurrCharValCase2:ReadTableGLCDCharCol4,CharCode,CurrCharValCase3:ReadTableGLCDCharCol5,CharCode,CurrCharValCase4:ReadTableGLCDCharCol6,CharCode,CurrCharValCase5:ReadTableGLCDCharCol7,CharCode,CurrCharValEndSelectForCurrCharRow=1to8IfCurrCharVal.0=0ThenPSetCharLocX+CurrCharCol,CharLocY+CurrCharRow,GLCDBackgroundElsePSetCharLocX+CurrCharCol,CharLocY+CurrCharRow,LineColourEndIfRotateCurrCharValRightNextNextEndSub
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This driver was the second driver to be developed... it needed a bit of updating to provide color support, OLED fonts and other things that have been introduced since 2014. :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi All
Using the ST7735 TFT. GCB v98.03.
GLCDPrint (10,100,"Hello") ' How do i set the color of text, default appears to be black
GLCDfntDefaultSize = 1 'the size of text does not change only the space between each character
Thanks
You could use GLCDDrawString(CharLocX, CharLocY, String [, Optional Colour] )
I agree with Stan.
You must use GLCDDrawString.
Unable to change color of 'GLCDDrawString' always prints as black, also the size of text does not change #chip 18F25k80,32
Thanks
Are you saying this does not work?
Yes!
box and circle work but 'GLCDDrawString' always prints black can't change the color.
Let me look now that you are using this method.
Check back later.
Please test this. There may be a silly error with the passing of the color. I have updated the method to pass the color correctly.
add this to your code. Test and let me know the result.
Still not working.
Post the complete the project as a ZIP. I will review online.
This driver was the second driver to be developed... it needed a bit of updating to provide color support, OLED fonts and other things that have been introduced since 2014. :-)
All Good. Thanks
please get the latest driver. I updated glcdcls to include a parameter.
Ecanvan
Evan