grove LCD screen class
Spaniakos - grove LCD screen class
|
#include <LCD.h>
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 |
LCD::LCD | ( | int | R, |
int | G, | ||
int | B, | ||
int | c, | ||
int | l | ||
) |
class constructor.
R | integer value of Red |
G | intefer value of Green |
B | integer value of Blue |
c | integer value of columns |
l | integer value of lines |
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.
my_str | string pointer that holds the string given |
size | integer value of the string length |
void LCD::Clear_Char_Array | ( | char * | my_ar, |
int | size | ||
) |
clear a char array to be used next.
my_ar | char pointer that holds the string given |
size | integer value of the string length |
void LCD::Print_To_LCD | ( | int | col, |
int | line | ||
) |
print to LCD. prints contents of the LCD_OUT array in the screen
col | integer value of the column to start printing |
line | integer 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.
str1 | the first string to be printed in line 1 |
str2 | the second string to be printed in line 2 |
|
private |
holds the Red color value
|
private |
holds the green color value
|
private |
holds the blue color value
|
private |
holds the columns of the screen
|
private |
holds the lines of the screen
char LCD::LCD_out[16] |
Buffer to print to the screen