Search Forum.. 

Confused with the control codes


I have difficulties undestanding the control codes as outlined in the Serial Character/Graphic Users Manual.

I have an application for the Electric Imp that display the weather forecast from a website. I use the following code:

display.write("SF"); display.write(0x01);display.write(0x01);

to set the font, however it doesn't matter what value I use in the second display.write, the font size never change!

What am I doing wrong?

Thanks for your help


RE:Confused with the control codes

preloaded font number is: 6,10,18,51,120,123,0(default), user font number is 200,201,202,203 maps to 4 user font memory sections, you can combine adjacent sections together is the font size >4kb(each section has 4kb in size)

The value of "0x01" you wrote is not a valid font, you can try: display.write("SF\x12"), to use the font of 18.

RE:Confused with the control codes

 Thanks, I tried, but still no changes.

It seems that only some of the control code are working, such as "CL", "TT", "TP"

Thanking you for your help.


RE:Confused with the control codes

 Don't run "CL" clear screen command after "SF", it will reset it to default either, you can run "SF" after "CL".

"CL" command will reset any setting to default (such as font, color, position) and clear the screen.

RE:Confused with the control codes

 Many thanks, THIS WAS my error!



Copyright Digole Digital Solutions, 2008-2022. All rights reserved.
Powered by Digole