grove LCD screen class
Spaniakos - grove LCD screen class
Public Member Functions | Public Attributes | Private Attributes | List of all members
LCD Class Reference

#include <LCD.h>

+ Inheritance diagram for LCD:

Public Member Functions

 LCD (int R, int G, int B, int c, int l)
 
void begin ()
 
void Pad_Str (String *my_str, int size)
 
void Clear_Char_Array (char *my_ar, int size)
 
void Print_To_LCD (int col, int line)
 
void Print_To_Screen (String str1, String str2)
 

Public Attributes

char LCD_out [16]
 

Private Attributes

int colorR
 
int colorG
 
int colorB
 
int cols
 
int lines
 

Detailed Description

Examples:
LCD.ino.

Constructor & Destructor Documentation

LCD::LCD ( int  R,
int  G,
int  B,
int  c,
int  l 
)

class constructor.

Parameters
Rinteger value of Red
Gintefer value of Green
Binteger value of Blue
cinteger value of columns
linteger value of lines

Member Function Documentation

void LCD::begin ( )

Initialized the base grove class with the balues given in the constructor.

void LCD::Pad_Str ( String *  my_str,
int  size 
)

pad strings with spaces.

Parameters
my_strstring pointer that holds the string given
sizeinteger value of the string length
Returns
No return value, the string is stored in the my_str pointer
void LCD::Clear_Char_Array ( char *  my_ar,
int  size 
)

clear a char array to be used next.

Parameters
my_archar pointer that holds the string given
sizeinteger value of the string length
Returns
No return value, the string is stored in the my_ar pointer
void LCD::Print_To_LCD ( int  col,
int  line 
)

print to LCD. prints contents of the LCD_OUT array in the screen

Parameters
colinteger value of the column to start printing
lineinteger value of the line to start printing
void LCD::Print_To_Screen ( String  str1,
String  str2 
)

print two string. The strings will be printed one per line to the lcd screen, before that, the strings will be padded in order to avoid flickering and in order to clear the rest of the screen.

Parameters
str1the first string to be printed in line 1
str2the second string to be printed in line 2

Member Data Documentation

int LCD::colorR
private

holds the Red color value

int LCD::colorG
private

holds the green color value

int LCD::colorB
private

holds the blue color value

int LCD::cols
private

holds the columns of the screen

int LCD::lines
private

holds the lines of the screen

char LCD::LCD_out[16]

Buffer to print to the screen