how would you suggest I go about printing the degree symbol on the display?
The easiest way to do this is to override one of the fonts in the GLCD base font library. To do this click the View menu and bring up the component debugger window. Tick the Expose full component tree checkbox and this allows you to explore all of the components packaged inside the GLCD component.
On the properties window select the drop down list at the very top of the window and select the ASCII2 component located inside the GLCD component.
Change the integer properties from this
Code: Select all
0x36 , 0x49 , 0x49 , 0x49 , 0x36 ,0x06 , 0x49 , 0x49 , 0x29 , 0x1E ,0x00 , 0x6C , 0x6C , 0x00 , 0x00 ,0x00 , 0xEC , 0x6C , 0x00 , 0x00 ,0x08 , 0x14 , 0x22 , 0x41 , 0x00 ,0x24 , 0x24 , 0x24 , 0x24 , 0x24 ,0x00 , 0x41 , 0x22 , 0x14 , 0x08 ,0x02 , 0x01 , 0x59 , 0x09 , 0x06 ,0x3E , 0x41 , 0x5D , 0x55 , 0x1E ,0x7E , 0x09 , 0x09 , 0x09 , 0x7E ,0x7F , 0x49 , 0x49 , 0x49 , 0x36 ,0x3E , 0x41 , 0x41 , 0x41 , 0x22
To this
Code: Select all
0x36 , 0x49 , 0x49 , 0x49 , 0x36 ,0x06 , 0x49 , 0x49 , 0x29 , 0x1E ,0x00 , 0x6C , 0x6C , 0x00 , 0x00 ,0x00 , 0x02 , 0x05 , 0x02 , 0x00 ,0x08 , 0x14 , 0x22 , 0x41 , 0x00 ,0x24 , 0x24 , 0x24 , 0x24 , 0x24 ,0x00 , 0x41 , 0x22 , 0x14 , 0x08 ,0x02 , 0x01 , 0x59 , 0x09 , 0x06 ,0x3E , 0x41 , 0x5D , 0x55 , 0x1E ,0x7E , 0x09 , 0x09 , 0x09 , 0x7E ,0x7F , 0x49 , 0x49 , 0x49 , 0x36 ,0x3E , 0x41 , 0x41 , 0x41 , 0x22
The change is the 4th character in the ASCII LUT where each character consists of 5 bytes equating to the pixels in each column.
0x00 , 0xEC , 0x6C , 0x00 , 0x00 => ;
to this
0x00 , 0x02 , 0x05 , 0x02 , 0x00 => °
This then overrides the ';' character to the '°' character and should also work in simulation.
You can then use things like this in strings: "Temp = 23.4;C" to achieve the following on the display.
Temp = 23.4°C
And you can keep the display I sent you. This works so well that I'm buying plenty more
Thank you very much, much appreciated and should allow me to use it as a test bed to sanity check I don't break things in new releases.
I have just shown it to my MD and he is keen on using them for something