a. Plotting a Set of Points

<< Click to Display Table of Contents >>

Navigation:  Tutorials > Tutorial 05 - Plotting Points >

a. Plotting a Set of Points

This section shows how to plot a set of points using the Point() command.

 

 

Command Prototype

 

uint16_t Point(int X, int Y);

 

Parameters

Description

X, Y

(x,y) coordinate of the point

 

 

Code

 

 

void setup()

{

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

 CleO.begin();

 

/* Start building a screen frame */

 CleO.Start();

 

 /* Draw set of points */

 for (int x = 100; x < 300; x += 10) {

   CleO.Point(x, x);

 }

 

 /* Display completed screen frame */

 CleO.Show();

}

 

void loop()

{

}

 

 

Description

 

The above code snippet draws a set of points in the for loop.

In each iteration, x and y coordinates are the same to give a diagonal look.

 

 

Output

 

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

 

PlottingPoints