a. Hello World Example

<< Click to Display Table of Contents >>

Navigation:  Tutorials > Tutorial 02 - Drawing Strings >

a. Hello World Example

This section provides an illustration on how to draw the "Hello World" string using the String() command.

 

 

Command Prototype

 

uint16_t String(int X, int Y, const char* String)

 

Parameters

Description

X

x-coordinate for string

Y

y-coordinate for string

String

String text

 

 

Code

 

 

void setup()

{

 /* Initialize CleO - needs to be done only once */

 CleO.begin();

 

 /* Start building a screen frame */

 CleO.Start();

 

 /* Draw a string "Hello World" at (400, 240) */

 CleO.String(400, 240, "Hello world");

 

 /* Display completed screen frame */

 CleO.Show();

}

 

 

Description

 

The above code snippet draws a string "Hello World" at the center of the screen.

 

 

Output

 

Here is the output displayed upon executing the above code snippet -

 

Tutorials02-HelloWorld.50