Arduino GLCD Shield acts as Arduino Shield via 1Sheeld

Buy 1Sheeld

GLCD Shield allows you to use your smartphone display screen as a graphical LCD screen for Arduino., so you can draw characters or interactive shapes with Arduino code.

This shield is one of the special shields. Special shields allows your Arduino board to use some capabilities your smartphone can do, like playing music, taking a picture, getting notifications, accessing the clock data and using the touch screen for various functions. Learn more from the special shields tutorial.

GLCD Shield turns your Smartphone’s Screen into a (256 x 128 points) that allows you to draw passive and interactive shapes “Lines, Circles, Progress Bars etc.” to display your ideas, data and even make animations.

Adding #define CUSTOM_SETTINGS along with #define INCLUDE_GLCD_SHIELD is a key that will let you unlock the GLCD shield only amongst all shields and prevent 1Sheeld library from eating your memory specially for UNO board.

Note

GLCD origins is set at the up left corner of the display.

unsigned long clear(void)

Clears the GLCD.

 

SYNTAX
GLCDShield.clear();

 

RETURNS
None.

 

PARAMETERS
None.

 

USAGE
GLCDShield.clear();

 

unsigned long draw(ShapeClass&)

Draws the shape created on the GLCD.

 

SYNTAX
GLCD.draw(shapeObject)

 

RETURNS
None.

 

PARAMETERS
Takes an object ShapeClass to draw the shape.

 

USAGE
GLCDPoint point(0,0);
GLCD.draw(point);

 

GLCDAnalogGauge Class Functions:

 

GLCDAnalogGauge(int,int,int)

Creates an analog gauge and simulates values.(default 0 to 100).

 

SYNTAX
GLCDAnalogGauge anGauge(x1Position,y1Position,radius);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).
– 3rd Parameter takes an integer holding raduis value.

 

USAGE
GLCDAnalogGauge anGauge(128,64,50);

 

void setRange(int,int)

Sets range of values to the created analog gauge.

 

SYNTAX
GLCDAnalogGauge anGauge(x1Position,y1Position,radius);
anGauge.setRange(start,end);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding start value.
– 2nd Parameter takes an integer holding end value.

 

USAGE
GLCDAnalogGauge anGauge(x1Position,y1Position,radius);
anGauge.setRange(0,200);

 

void setValue(int)

Sets the value to be simulated on the analog gauge.

 

SYNTAX
GLCDAnalogGauge anGauge(x1Position,y1Position,radius);
anGauge.setValue(value);

 

RETURNS
None.

 

PARAMETERS
Takes an integer holding the value to be simulated on the analog gauge.

 

USAGE
GLCDAnalogGauge anGauge(x1Position,y1Position,radius);
anGauge.setValue(50);

 

void setRadius(int)

Change the radius of the analog gauge.

 

SYNTAX
GLCDAnalogGauge anGauge(x1Position,y1Position,radius);
anGauge.setRadius(radiusValue);

 

RETURNS
None.

 

PARAMETERS
Takes an integer holding the new radius value to be changed.

 

USAGE
GLCDAnalogGauge anGauge(x1Position,y1Position,radius);
anGauge.setRadius(100);

 

void setVisibility(bool)

Makes the analog gauge visible or invisible.

 

SYNTAX
GLCDAnalogGauge anGauge(x1Position,y1Position,radius);
anGauge.setVisibility(True/False);

 

RETURNS
None.

 

PARAMETERS
Takes a True or False to make the shape visible or invisible.

 

USAGE
GLCDAnalogGauge anGauge(x1Position,y1Position,radius);
anGauge.setVisibility(true);

 

void setPosition(int,int)

Reset the position of the created analog gauge.

 

SYNTAX
GLCDAnalogGauge anGauge(x1Position,y1Position,radius);
anGauge.setPosition(xPosition,yPosition);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).

 

USAGE
anGauge.setPosition(100,100);

 

GLCDButton Class Functions:

 

GLCDButton(int , int,int,int,char *)

Creates a button to perform tasks.

 

SYNTAX
GLCDButton button(x1Position,y1Position,width,height,ButtonName);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).
– 3rd Parameter takes an integer holding button width.
– 4th Parameter takes an integer holding button height.
– 5th Parameter takes a char array holding button name.

 

USAGE
GLCDButton button(128,64,50,50,"1Sheeld");

 

GLCDButton(int , int , int ,int)

Creates a button to perform tasks.But without name it will have a name by default.

 

SYNTAX
GLCDButton button(x1Position,y1Position,width,height);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).
– 3rd Parameter takes an integer holding button width.
– 4th Parameter takes an integer holding button height.

 

USAGE
GLCDButton button(128,64,50,50);

 

bool isPressed(void)

Checks if button has been pressed.

 

SYNTAX
GLCDButton button(x1Position,y1Position,width,height);
button.isPressed();

 

RETURNS
Returns a Yes “1” or No “0” of button state.

 

PARAMETERS
None.

 

USAGE
bool isButtonPressed = false;
isButtonPressed = button.isPressed();

 

void setText(char *)

Changes button name.

 

SYNTAX
GLCDButton button(x1Position,y1Position,width,height);
button.setText(buttonNewName);

 

RETURNS
None.

 

PARAMETERS
Takes a char array holding new button name.

 

USAGE
button.setText(”1Sheeld”);

 

void setStyle(byte)

Sets the style of the button. (default = 2D)

Literals

STYLE_2D
STYLE_3D

 

SYNTAX
GLCDButton button(x1Position,y1Position,width,height);
button.setStyle(LITERAL);

 

RETURNS
None.

 

PARAMETERS
Takes a byte holding one of the literals above.

 

USAGE
button.setStyle(STYLE_3D);

 

void setDimensions(int,int)

Resize the button by setting its dimensions.

 

SYNTAX
GLCDButton button(x1Position,y1Position,width,height);
button.setDimensions(width,height);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding new width.
– 2nd Parameter takes an integer holding new height.

 

USAGE
button.setDimensions(100,20);

 

void setVisibility(bool)

Makes the button visible or invisible..

 

SYNTAX
GLCDButton button(x1Position,y1Position,width,height);
button.setVisibility(True/False);

 

RETURNS
None.

 

PARAMETERS
Takes a True or False to make the shape visible or invisible.

 

USAGE
button.setVisibility(true);

 

void setPosition(int,int)

Reset the position of the button.

 

SYNTAX
GLCDButton button(x1Position,y1Position,width,height);
button.setPosition(xPosition,yPosition);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).

 

USAGE
button.setPosition(100,100);

 

void setOnChange(void(*userFunction)(byte))

Sets a certain user function to be invoked once the button is pushed.

 

SYNTAX
button.setonChange(&userFunction);

 

RETURNS
None.

 

PARAMETERS
&userFunctionName: takes the physical address of the userFunction in the memory and jump to it once called to execute it’s functionality.

 

USAGE
button.setOnChange(&userFunction);

 

GLCDCheckBox Class Functions:

 

GLCDCheckBox(int,int,char *)

Creates a checkbox to perform certain tasks.

 

SYNTAX
GLCDCheckBox chkBox(x1Position,y1Position,dataString);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).
– 3rd Parameter takes an char array holding text.

 

USAGE
GLCDCheckBox chkBox (0,0,”1Sheeld”);

 

void setText(char *)

Sets the data resides the checkbox.

 

SYNTAX
GLCDCheckBox chkBox(x1Position,y1Position,dataString);
chkBox.setText(checkBoxInfo);

 

RETURNS
None.

 

PARAMETERS
Takes a char array holding text.

 

USAGE
chkBox.setText(”1Sheeld”);

 

void setSize(byte )

Set size of chkBox. (default=SMALL)

Literals

SMALL
MEDIUM
LARGE

 

SYNTAX
GLCDCheckBox chkBox(x1Position,y1Position,dataString);
chkBox.setSize(LITERAL);

 

RETURNS
None.

 

PARAMETERS
Takes a byte holding one of the literals above.

 

USAGE
chkBox.setSize(LARGE);

 

void select(void )

Select the check box.

 

SYNTAX
GLCDCheckBox chkBox(x1Position,y1Position,dataString);
chkBox.select();

 

RETURNS
None.

 

PARAMETERS
None.

 

USAGE
chkBox.select();

 

void deselect(void )

Deselect the check box.

 

SYNTAX
GLCDCheckBox chkBox(x1Position,y1Position,dataString);
chkBox.deselect();

 

RETURNS
None.

 

PARAMETERS
None.

 

USAGE
chkBox.deselect();

 

void setVisibility(bool)

Makes the check Box visible or invisible.

 

SYNTAX
GLCDCheckBox chkBox(x1Position,y1Position,dataString);
chkBox.setVisibility(True/False);

 

RETURNS
None.

 

PARAMETERS
Takes a True or False to make the shape visible or invisible.

 

USAGE
chkBox.setVisibility(true);

 

void setPosition(int,int)

Reset the position of the check box.

 

SYNTAX
GLCDCheckBox chkBox(x1Position,y1Position,dataString);
chkBox.setPosition(xPosition,yPosition);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).

 

USAGE
chkBox.setPosition(100,100);

 

void setOnChange(void(*userFunction)(byte))

Sets a certain user function to be invoked once the check box is selected.

 

SYNTAX
chkBox.setonChange(&userFunction);

 

RETURNS
None.

 

PARAMETERS
&userFunctionName: takes the physical address of the userFunction in the memory and jump to it once called to execute it’s functionality.

 

USAGE
chkBox.setOnChange(&userFunction);

 

GLCDEllipse Class Functions:

 

GLCDEllipse(int,int,int,int)

Creates an Ellipse with two radius values.

 

SYNTAX
GLCDEllipse ellipse(x1Position,y1Position,semiminor axis,semimajor axis);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).
– 3rd Parameter takes an integer holding semiminor axis length.
– 4th Parameter takes an integer holding semimajor axis length.

 

USAGE
GLCDEllipse ellipse(0,0,50,20);

 

void setRadius(int,int)

Change the semiminor axis and the semimajor axis of the ellipse object.

 

SYNTAX
GLCDEllipse ellipse(x1Position,y1Position,semiminor axis,semimajor axis);
ellipse.setRadius(semiminorAxis,semimajorAxis);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding semiminor axis length.
– 2nd Parameter takes an integer holding semimajor axis length.

 

USAGE
ellipse.setRadius(20,30);

 

void setFill(bool )

Fill the shape (default = empty).

 

SYNTAX
GLCDEllipse ellipse(x1Position,y1Position,semiminor axis,semimajor axis);
ellipse.setFill(true);

 

RETURNS
None.

 

PARAMETERS
Takes a True/False filling or emptying the shape..

 

USAGE
ellipse.setFill(true);

 

void setVisibility(bool)

Makes the ellipse visible or invisible.

 

SYNTAX
GLCDEllipse ellipse(x1Position,y1Position,semiminor axis,semimajor axis);
ellipse.setVisibility(True/False);

 

RETURNS
None.

 

PARAMETERS
Takes a True or False to make the shape visible or invisible.

 

USAGE
ellipse.setVisibility(true);

 

void setPosition(int,int)

Reset the position of the ellipse.

 

SYNTAX
GLCDEllipse ellipse(x1Position,y1Position,semiminor axis,semimajor axis);
ellipse.setPosition(xPosition,yPosition);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).

 

USAGE
ellipse.setPosition(100,100);

 

GLCDLine Class Functions:

 

GLCDLine (int,int,int,int)

Creates a line with a start and an end.

 

SYNTAX
GLCDLine line(x1Position,y1Position,x2Position,y2Position);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x1 position from (0-255).
– 2nd Parameter takes an integer holding y1 position from (0-127).
– 3rd Parameter takes an integer holding x2 position.
– 4th Parameter takes an integer holding y2 position.

 

USAGE
GLCDLine line(0,0,128,64);

 

void setCoordinates(int,int ,int ,int)

Update the coordinates of the line’s start point.(not moving the whole line just the start point)

 

SYNTAX
GLCDLine line(x1Position,y1Position,x2Position,y2Position);
line.setCoordinates(newX1Position,newY1Position);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding new x1 position.
– 2nd Parameter takes an integer holding new y1 position.

 

USAGE
line.setCoordinates(0,0,255,127);

 

void setVisibility(bool)

Makes the line visible or invisible.

 

SYNTAX
GLCDLine line(x1Position,y1Position,x2Position,y2Position);
line.setVisibility(True/False);

 

RETURNS
None.

 

PARAMETERS
Takes a True or False to make the shape visible or invisible.

 

USAGE
line.setVisibility(true);

 

void setPosition(int,int)

Reset the line position with respect to its dimensions.

 

SYNTAX
GLCDLine line(x1Position,y1Position,x2Position,y2Position);
line.setPosition(xPosition,yPosition);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).

 

USAGE
line.setPosition(100,100);

 

GLCDPoint Class Functions:

 

GLCDPoint(int,int)

Draws a Point at a certain position of coordinates (x,y).

 

SYNTAX
GLCDPoint point(xPosition,yPosition);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x1 position from (0-255).
– 2nd Parameter takes an integer holding y1 position from (0-127).

 

USAGE
GLCDPoint point(0,0);

 

void setVisibility(bool)

Makes the point visible or invisible.

 

SYNTAX
GLCDPoint point(xPosition,yPosition);
point.setVisibility(True/False);

 

RETURNS
None.

 

PARAMETERS
Takes a True or False to make the shape visible or invisible.

 

USAGE
point.setVisibility(true);

 

void setPosition(int,int)

Reset point position.

 

SYNTAX
GLCDPoint point(xPosition,yPosition);
point.setPosition(xPosition,yPosition);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).

 

USAGE
point.setPosition(100,100);

 

GLCDProgressBar Class Functions:

 

GLCDProgressBar(int,int,int,int)

Creates a progress bar to simulate it’s values.

 

SYNTAX
GLCDProgressBar prgBar(x1Position,y1Position,width,height);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).
– 3rd Parameter takes an integer holding progress bar width.
– 4th Parameter takes an integer holding progress bar height.

 

USAGE
GLCDProgressBar prgBar(0,0,200,10);

 

void setRange(int,int)

Sets ranges of values to the created progressBar.(default 0 to 100)

 

SYNTAX
GLCDProgressBar prgBar(x1Position,y1Position,width,height);
prgBar.setRange(start,end);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding start range value.
– 2nd Parameter takes an integer holding end range value.

 

USAGE
prgBar.setRange(0,200);

 

void setValue(int)

Sets the value to be simulated on the progress bar.

 

SYNTAX
GLCDProgressBar prgBar(x1Position,y1Position,width,height);
prgBar.setValue(value);

 

RETURNS
None.

 

PARAMETERS
Takes an integer holding value to be simulated in the progress bar.

 

USAGE
prgBar.setValue(50);

 

void setDimensions(int,int)

Resize the progressBar by setting its dimensions with respect to its range.

 

SYNTAX
GLCDProgressBar prgBar(x1Position,y1Position,width,height);
prgBar.setDimensions(width,height);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding new width.
– 2nd Parameter takes an integer holding new height.

 

USAGE
prgBar.setDimensions(100,20);

 

void setVisibility(bool)

Makes the progressBar visible or invisible.

 

SYNTAX
GLCDProgressBar prgBar(x1Position,y1Position,width,height);
prgBar.setVisibility(True/False);

 

RETURNS
None.

 

PARAMETERS
Takes a True or False to make the shape visible or invisible.

 

USAGE
prgBar.setVisibility(true)

 

void setPosition(int,int)

Reset the position of the progressBar.

 

SYNTAX
GLCDProgressBar prgBar(x1Position,y1Position,width,height);
prgBar.setPosition(xPosition,yPosition);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).

 

USAGE
prgBar.setPosition(100,100);

 

GLCDRadioButton Class Functions:

 

GLCDRadioButton(int,int,char *)

Creates a radio button to perform certain tasks.(default = not assigned to any group of radio buttons)

 

SYNTAX
GLCDRadioButton rdButton(x1Position,y1Position,dataString);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).
– 3rd Parameter takes a char array holding radio button text.

 

USAGE
GLCDRadioButton rdbutton(0,0,”1Sheeld”);

 

GLCDRadioButton(int,int,char *,int)

Draws a radio button to perform tasks and assigned to a certain group of radio buttons.(group index may start from 0).

 

SYNTAX
GLCDRadioButton rdButton(x1Position,y1Position,dataString,0);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).
– 3rd Parameter takes a char array holding radio button text.
– 4th Parameter takes an integer holding radio button group.

 

USAGE
GLCDRadioButton rdbutton(0,0,”1Sheeld”,0);

 

bool isSelected(void)

Checks if the radioButton is selected.

 

SYNTAX
GLCDRadioButton rdButton(x1Position,y1Position,dataString);
rdButton.isSelected();

 

RETURNS
Returns a True or False.

 

PARAMETERS
None.

 

USAGE
bool isRadioButtonSelected = false;
isRadioButtonSelected = rdButton.isSelected( );

 

int getGroupNumber(void)

Returns radioButton’s current group number.

 

SYNTAX
GLCDRadioButton rdButton(x1Position,y1Position,dataString);
rdButton.getGroupNumber();

 

RETURNS
Returns an integer holding the number of group radioButton assigned to.

 

PARAMETERS
None.

 

USAGE
int gourpNumber;
gourpNumber= rdButton.getGroupNumber( );

 

void setText(char *)

Sets the text resides the radio button.

 

SYNTAX
GLCDRadioButton rdButton(x1Position,y1Position,dataString);
rdbutton.setText(buttonName);

 

RETURNS
None.

 

PARAMETERS
Takes a char array holding radio button text.

 

USAGE
rdbutton.setText(”1Sheeld”);

 

void setSize(byte)

Set radioButton size.(default=SMALL)

 

Literals

SMALL
MEDIUM
LARGE

 

SYNTAX
GLCDRadioButton rdButton(x1Position,y1Position,dataString);
rdButton.setSize(LITERAL);

 

RETURNS
None.

 

PARAMETERS
Takes a byte holding one the literals above.

 

USAGE
rdButton.setSize(LARGE);

 

void setGroup(int)

Assign the button to a certain group.

 

SYNTAX
GLCDRadioButton rdButton(x1Position,y1Position,dataString);
rdButton.setGroup(groupNumber);

 

RETURNS
None.

 

PARAMETERS
Takes an integer holding a group number to be assigned to.

 

USAGE
rdButton.setGroup(0);

 

void select(void)

Selects the button.

 

SYNTAX
GLCDRadioButton rdButton(x1Position,y1Position,dataString);
rdButton.select();

 

RETURNS
None.

 

PARAMETERS
None.

 

USAGE
rdButton.select();

 

void setVisibility(bool)

Makes the radio button visible or invisible.

 

SYNTAX
GLCDRadioButton rdButton(x1Position,y1Position,dataString);
rdbutton.setVisibility(True/False);

 

RETURNS
None.

 

PARAMETERS
Takes a True or False to make the shape visible or invisible.

 

USAGE
rdbutton.setVisibility(true)

 

void setPosition(int,int)

Reset the position of the radiobutton.

 

SYNTAX
GLCDRadioButton rdButton(x1Position,y1Position,dataString);
rdbutton.setPosition(xPosition,yPosition);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).

 

USAGE
rdbutton.setPosition(100,100);

 

void setOnChange(void(*userFunction)(byte))

Sets a certain user function to be invoked once the radio button is selected.

 

SYNTAX
rdbutton.setonChange(&userFunction);

 

RETURNS
None.

 

PARAMETERS
&userFunctionName: takes the physical address of the userFunction in the memory and jump to it once called to execute it’s functionality.

 

USAGE
rdbutton.setOnChange(&userFunction);

 

GLCDRectangle Class Functions:

 

GLCDRectangle(int,int,int,int,int)

Creates a rectangle/rounded rectangle with certain width and height.

 

SYNTAX
GLCDRectangle rectangle(x1Position,y1Position,width,height,radius);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).
– 3rd Parameter takes an integer holding width.
– 4th Parameter takes an integer holding height.
– 5th Parameter takes an integer holding corner radius to draw a rounded rectangle.

 

USAGE
GLCDRectangle rectangle(0,0,50,20);
or
GLCDRectangle rectangle(0,0,50,20,20);

 

void setRadius(int)

Reset the radius of the rounded rectangle.

 

SYNTAX
GLCDRectangle rectangle(x1Position,y1Position,width,height,radius);
rectangle.setRadius(radiusValue);

 

RETURNS
None.

 

PARAMETERS
Takes an integer holding radius value.

 

USAGE
rectangle.setRadius(20);

 

void setFill(bool)

Fill the rectangle(default= empty).

 

SYNTAX
GLCDRectangle rectangle(x1Position,y1Position,width,height,radius);
rectangle.setFill(true);

 

RETURNS
None.

 

PARAMETERS
Takes a True/False filling or emptying the rectangle.

 

USAGE
rectangle.setFill(true);

 

void setDimensions(int,int)

Resize rectangle by setting its new dimensions.

 

SYNTAX
GLCDRectangle rectangle(x1Position,y1Position,width,height,radius);
rectangle.setDimensions(width,height);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding the new width.
– 2nd Parameter takes an integer holding the new height.

 

USAGE
rectangle.setDimensions(50,50);

 

void setVisibility(bool)

Makes the rectangle visible or invisible.

 

SYNTAX
GLCDRectangle rectangle(x1Position,y1Position,width,height,radius);
rectangle.setVisibility(True/False);

 

RETURNS
None.

 

PARAMETERS
Takes a True or False to make the shape visible or invisible.

 

USAGE
rectangle.setVisibility(true);

 

void setPosition(int,int)

Reset the position of the rectangle.

 

SYNTAX
GLCDRectangle rectangle(x1Position,y1Position,width,height,radius);
rectangle.setPosition(xPosition,yPosition);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).

 

USAGE
rectangle.setPosition(100,100);

 

GLCDSlider Class Functions:

 

GLCDSlider(int,int,int,int)

Creates a slider to perform a certain task.

 

SYNTAX
GLCDSlider slider(x1Position,y1Position,length,scrollRadius);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).
– 3rd Parameter takes an integer holding length.
– 4th Parameter takes an integer holding scroll Radius.

 

USAGE
GLCDSlider slider(0,0,200,20);

 

void setRange(int,int)

Sets range values of slider.(default 0-100)

 

SYNTAX
GLCDSlider slider(x1Position,y1Position,length,scrollRadius);
slider.setRange(start,end);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding the start value.
– 2nd Parameter takes an integer holding the end value.

 

USAGE
slider.setRange(0,200);

 

void setValue(int)

Sets the value to be simulated on the slider.

 

SYNTAX
GLCDSlider slider(x1Position,y1Position,length,scrollRadius);
slider.setValue(value);

 

RETURNS
None.

 

PARAMETERS
Takes an integer holding the value to be simulated in the slider.

 

USAGE
slider.setValue(50);

 

int getValue(void)

Returns back the current value of the slider.

 

SYNTAX
GLCDSlider slider(x1Position,y1Position,length,scrollRadius);
slider.getValue();

 

RETURNS
Returns an integer holding the current value of the slider.

 

PARAMETERS
None.

 

USAGE
currentSliderValue  = slider.getValue();

 

void setDimensions(int ,int)

Resize the slider by setting its dimensions.

 

SYNTAX
GLCDSlider slider(x1Position,y1Position,length,scrollRadius);
slider.setDimensions(width,height);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding the new width.
– 2nd Parameter takes an integer holding the new height.

 

USAGE
slider.setDimensions(50,50);

 

void setVisibility(bool)

Makes the slider visible or invisible.

 

SYNTAX
GLCDSlider slider(x1Position,y1Position,length,scrollRadius);
slider.setVisibility(True/False);

 

RETURNS
None.

 

PARAMETERS
Takes a True or False to make the shape visible or invisible.

 

USAGE
slider.setVisibility(true);

 

void setPosition(int,int)

Reset the position of the slider.

 

SYNTAX
GLCDSlider slider(x1Position,y1Position,length,scrollRadius);
slider.setPosition(xPosition,yPosition);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).

 

USAGE
slider.setPosition(100,100);

 

void setOnChange(void(*userFunction)(int))

Sets a certain user function to be invoked once the check slider valuse is changed.

 

SYNTAX
slider.setonChange(&userFunction);

 

RETURNS
None.

 

PARAMETERS
&userFunctionName: takes the physical address of the userFunction in the memory and jump to it once called to execute it’s functionality.

 

USAGE
slider.setOnChange(&userFunction);

 

GLCDTextBox Class Functions:

 

GLCDTextBox(int,int,char *)

Creates a Text box to hold text.

 

SYNTAX
GLCDTextBox text(x1Position,y1Position,dataString);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).
– 3rd Parameter takes an integer holding text.

 

USAGE
GLCDTextBox textBox(0,0,”1Sheeld”);

 

void setFont(byte)

Set font of text.(default= ARIAL)

Literals

ARIAL
ARIAL_BOLD
ARIAL_ITALIC
COMIC_SANS
SERIF

 

SYNTAX
GLCDTextBox text(x1Position,y1Position,dataString);
text.setFont(LITERAL);

 

RETURNS
None.

 

PARAMETERS
Takes a byte holding one of the literal above.

 

USAGE
textBox.setFont(SERIF);

 

void setSize(byte)

Set text size.(default= SMALL)

Literals

SMALL
MEDIUM
LARGE

 

SYNTAX
GLCDTextBox text(x1Position,y1Position,dataString);
text.setSize(LITERAL);

 

RETURNS
None.

 

PARAMETERS
Takes a byte holding one of the literal above.

 

USAGE
textBox.setSize(LARGE);

 

void setText(char*)

Reset the  text of the textBox.

 

SYNTAX
GLCDTextBox text(x1Position,y1Position,dataString);
text.setText(textBoxName);

 

RETURNS
None.

 

PARAMETERS
Takes a char array holding the new text.

 

USAGE
text.setText(”1Sheeld”);

 

void setVisibility(bool)

Makes the textBox visible or invisible.

 

SYNTAX
GLCDTextBox text(x1Position,y1Position,dataString);
textBox.setVisibility(True/False);

 

RETURNS
None.

 

PARAMETERS
Takes a True or False to make the shape visible or invisible.

 

USAGE
textBox.setVisibility(true);

 

void setPosition(int,int)

Reset the position of the textBox.

 

SYNTAX
GLCDTextBox text(x1Position,y1Position,dataString);
textBox.setPosition(xPosition,yPosition);

 

RETURNS
None.

 

PARAMETERS
– 1st Parameter takes an integer holding x position from (0-255).
– 2nd Parameter takes an integer holding y position from (0-127).

 

USAGE
textBox.setPosition(100,100);