1 #ifndef EAGLE_EBOARD_HELPLIB_LCD 2 #define EAGLE_EBOARD_HELPLIB_LCD 18 {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
19 {0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00},
20 {0x00,0x00,0x07,0x00,0x07,0x00,0x00,0x00},
21 {0x00,0x14,0x7F,0x14,0x7F,0x14,0x00,0x00},
22 {0x00,0x24,0x2A,0x7F,0x2A,0x12,0x00,0x00},
23 {0x00,0x23,0x13,0x08,0x64,0x62,0x00,0x00},
24 {0x00,0x36,0x49,0x55,0x22,0x50,0x00,0x00},
25 {0x00,0x00,0x05,0x03,0x00,0x00,0x00,0x00},
26 {0x00,0x1C,0x22,0x41,0x00,0x00,0x00,0x00},
27 {0x00,0x41,0x22,0x1C,0x00,0x00,0x00,0x00},
28 {0x00,0x08,0x2A,0x1C,0x2A,0x08,0x00,0x00},
29 {0x00,0x08,0x08,0x3E,0x08,0x08,0x00,0x00},
30 {0x00,0xA0,0x60,0x00,0x00,0x00,0x00,0x00},
31 {0x00,0x08,0x08,0x08,0x08,0x08,0x00,0x00},
32 {0x00,0x60,0x60,0x00,0x00,0x00,0x00,0x00},
33 {0x00,0x20,0x10,0x08,0x04,0x02,0x00,0x00},
34 {0x00,0x3E,0x51,0x49,0x45,0x3E,0x00,0x00},
35 {0x00,0x00,0x42,0x7F,0x40,0x00,0x00,0x00},
36 {0x00,0x62,0x51,0x49,0x49,0x46,0x00,0x00},
37 {0x00,0x22,0x41,0x49,0x49,0x36,0x00,0x00},
38 {0x00,0x18,0x14,0x12,0x7F,0x10,0x00,0x00},
39 {0x00,0x27,0x45,0x45,0x45,0x39,0x00,0x00},
40 {0x00,0x3C,0x4A,0x49,0x49,0x30,0x00,0x00},
41 {0x00,0x01,0x71,0x09,0x05,0x03,0x00,0x00},
42 {0x00,0x36,0x49,0x49,0x49,0x36,0x00,0x00},
43 {0x00,0x06,0x49,0x49,0x29,0x1E,0x00,0x00},
44 {0x00,0x00,0x36,0x36,0x00,0x00,0x00,0x00},
45 {0x00,0x00,0xAC,0x6C,0x00,0x00,0x00,0x00},
46 {0x00,0x08,0x14,0x22,0x41,0x00,0x00,0x00},
47 {0x00,0x14,0x14,0x14,0x14,0x14,0x00,0x00},
48 {0x00,0x41,0x22,0x14,0x08,0x00,0x00,0x00},
49 {0x00,0x02,0x01,0x51,0x09,0x06,0x00,0x00},
50 {0x00,0x32,0x49,0x79,0x41,0x3E,0x00,0x00},
51 {0x00,0x7E,0x09,0x09,0x09,0x7E,0x00,0x00},
52 {0x00,0x7F,0x49,0x49,0x49,0x36,0x00,0x00},
53 {0x00,0x3E,0x41,0x41,0x41,0x22,0x00,0x00},
54 {0x00,0x7F,0x41,0x41,0x22,0x1C,0x00,0x00},
55 {0x00,0x7F,0x49,0x49,0x49,0x41,0x00,0x00},
56 {0x00,0x7F,0x09,0x09,0x09,0x01,0x00,0x00},
57 {0x00,0x3E,0x41,0x41,0x51,0x72,0x00,0x00},
58 {0x00,0x7F,0x08,0x08,0x08,0x7F,0x00,0x00},
59 {0x00,0x41,0x7F,0x41,0x00,0x00,0x00,0x00},
60 {0x00,0x20,0x40,0x41,0x3F,0x01,0x00,0x00},
61 {0x00,0x7F,0x08,0x14,0x22,0x41,0x00,0x00},
62 {0x00,0x7F,0x40,0x40,0x40,0x40,0x00,0x00},
63 {0x00,0x7F,0x02,0x0C,0x02,0x7F,0x00,0x00},
64 {0x00,0x7F,0x04,0x08,0x10,0x7F,0x00,0x00},
65 {0x00,0x3E,0x41,0x41,0x41,0x3E,0x00,0x00},
66 {0x00,0x7F,0x09,0x09,0x09,0x06,0x00,0x00},
67 {0x00,0x3E,0x41,0x51,0x21,0x5E,0x00,0x00},
68 {0x00,0x7F,0x09,0x19,0x29,0x46,0x00,0x00},
69 {0x00,0x26,0x49,0x49,0x49,0x32,0x00,0x00},
70 {0x00,0x01,0x01,0x7F,0x01,0x01,0x00,0x00},
71 {0x00,0x3F,0x40,0x40,0x40,0x3F,0x00,0x00},
72 {0x00,0x1F,0x20,0x40,0x20,0x1F,0x00,0x00},
73 {0x00,0x3F,0x40,0x38,0x40,0x3F,0x00,0x00},
74 {0x00,0x63,0x14,0x08,0x14,0x63,0x00,0x00},
75 {0x00,0x03,0x04,0x78,0x04,0x03,0x00,0x00},
76 {0x00,0x61,0x51,0x49,0x45,0x43,0x00,0x00},
77 {0x00,0x7F,0x41,0x41,0x00,0x00,0x00,0x00},
78 {0x00,0x02,0x04,0x08,0x10,0x20,0x00,0x00},
79 {0x00,0x41,0x41,0x7F,0x00,0x00,0x00,0x00},
80 {0x00,0x04,0x02,0x01,0x02,0x04,0x00,0x00},
81 {0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00},
82 {0x00,0x01,0x02,0x04,0x00,0x00,0x00,0x00},
83 {0x00,0x20,0x54,0x54,0x54,0x78,0x00,0x00},
84 {0x00,0x7F,0x48,0x44,0x44,0x38,0x00,0x00},
85 {0x00,0x38,0x44,0x44,0x28,0x00,0x00,0x00},
86 {0x00,0x38,0x44,0x44,0x48,0x7F,0x00,0x00},
87 {0x00,0x38,0x54,0x54,0x54,0x18,0x00,0x00},
88 {0x00,0x08,0x7E,0x09,0x02,0x00,0x00,0x00},
89 {0x00,0x18,0xA4,0xA4,0xA4,0x7C,0x00,0x00},
90 {0x00,0x7F,0x08,0x04,0x04,0x78,0x00,0x00},
91 {0x00,0x00,0x7D,0x00,0x00,0x00,0x00,0x00},
92 {0x00,0x80,0x84,0x7D,0x00,0x00,0x00,0x00},
93 {0x00,0x7F,0x10,0x28,0x44,0x00,0x00,0x00},
94 {0x00,0x41,0x7F,0x40,0x00,0x00,0x00,0x00},
95 {0x00,0x7C,0x04,0x18,0x04,0x78,0x00,0x00},
96 {0x00,0x7C,0x08,0x04,0x7C,0x00,0x00,0x00},
97 {0x00,0x38,0x44,0x44,0x38,0x00,0x00,0x00},
98 {0x00,0xFC,0x24,0x24,0x18,0x00,0x00,0x00},
99 {0x00,0x18,0x24,0x24,0xFC,0x00,0x00,0x00},
100 {0x00,0x00,0x7C,0x08,0x04,0x00,0x00,0x00},
101 {0x00,0x48,0x54,0x54,0x24,0x00,0x00,0x00},
102 {0x00,0x04,0x7F,0x44,0x00,0x00,0x00,0x00},
103 {0x00,0x3C,0x40,0x40,0x7C,0x00,0x00,0x00},
104 {0x00,0x1C,0x20,0x40,0x20,0x1C,0x00,0x00},
105 {0x00,0x3C,0x40,0x30,0x40,0x3C,0x00,0x00},
106 {0x00,0x44,0x28,0x10,0x28,0x44,0x00,0x00},
107 {0x00,0x1C,0xA0,0xA0,0x7C,0x00,0x00,0x00},
108 {0x00,0x44,0x64,0x54,0x4C,0x44,0x00,0x00},
109 {0x00,0x08,0x36,0x41,0x00,0x00,0x00,0x00},
110 {0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00},
111 {0x00,0x41,0x36,0x08,0x00,0x00,0x00,0x00},
112 {0x00,0x02,0x01,0x01,0x02,0x01,0x00,0x00},
113 {0x00,0x02,0x05,0x05,0x02,0x00,0x00,0x00}
122 #define LCD_COMMAND_MODE 0x80 123 #define LCD_DATA_MODE 0x40 125 #define LCD_COMMAND_DISPLAY_OFF 0xAE 127 #define LCD_COMMAND_DISPLAY_ON 0xAF 129 #define LCD_COMMAND_BLACK_BACKGROUND 0xA6 131 #define LCD_COMMAND_WHITE_BACKGROUND 0xA7 133 #define LCD_COMMAND_SET_BRIGHTNESS 0x81 135 #define LCD_PAGE_ADDRESSING 0x02 137 #define LCD_HORIZONTAL_ADDRESSING 0x00 141 #define LCD_COMMAND_CHARGE_PUMP_SETTING 0x8d 142 #define LCD_COMMAND_CHARGE_PUMP_ENABLE 0x14 146 #define LCD_WIDTH 128 150 #define LCD_HEIGHT 64 248 void print(
const char* data);
254 void print(
int data);
324 void drawBitmap(
const unsigned char *bitmap, byte posX, byte posY, byte hiX, byte hiY);
346 bool setCursor(byte posX = 0x0, byte posY = 0x0);
417 #if EBOARD_NANO == 0x0 437 for(byte i = 0; i < 8; i++){
441 for (byte j = 0; j < 128; j++)
461 if(data[i] < 32 || data[i] > 127){ i++;
continue;}
462 for (byte j = 0; j < 8; j++){
469 char buffer[11] =
"";
470 itoa(data,buffer,10);
471 this->
print(line,col,buffer);
480 return this->
clear();
497 return this->
clear();
500 void LCD::drawBitmap(
const unsigned char *bitmap, byte posX, byte posY, byte hiX, byte hiY){
504 for(
int i = 0x0; i < (hiX * 8 * hiY); i++){
505 this->
s1Dat(pgm_read_byte(&bitmap[i]));
506 if(++col == (hiX * 8)) {
519 this->
s2Cmd((0x00 + (8 *posX & 0x0F)),(0x10 + ((8 * posX >> 4) & 0x0F)));
520 this->
pX = posX; this->
pY = posY;
521 return this->
s1Cmd(0xB0 + posY);
526 this->
s2Cmd(0x81,val);
527 Wire.beginTransmission(this->
ID);
528 return (
Wire.endTransmission() == 0);
543 Wire.beginTransmission(this->
ID);
545 return (
Wire.endTransmission()==0);
549 Wire.beginTransmission(this->
ID);
551 Wire.endTransmission();
This is the SoccerBoard ghost struct :D.
#define LCD_COMMAND_CHARGE_PUMP_ENABLE
void s2Cmd(optVAL_t o, optVAL_t t)
this function will execute two cmd sends without starting and without ending the transmission ...
bool reset(void)
clears the screen
void changeMode(bool newMode=true)
enable or disable the display
bool init(void)
initializes the Display called by:
#define LCD_COMMAND_DISPLAY_ON
byte pX
the addressing mode (page/horizontal)
#define LCD_COMMAND_CHARGE_PUMP_SETTING
#define LCD_COMMAND_BLACK_BACKGROUND
bool setCursor(byte posX=0x0, byte posY=0x0)
set the position of the cursor
LCD(SoccerBoard &soccerBoard, optVAL_t id=0x3C)
The constructor.
void changeBackground(bool newBackground=false)
changes the background of the display
optVAL_t ID
ID of the Display.
#define LCD_COMMAND_DISPLAY_OFF
void s1Dat(optVAL_t o)
this function will execute one dat send without starting and without ending the transmission ...
#define LCD_COMMAND_WHITE_BACKGROUND
void lightOn(void)
enable the backlight
void lightOff(void)
disable the backlight
bool clear(void)
clears the LCD
bool s1Cmd(optVAL_t o)
this function will execute one cmd send without starting and without ending the transmission ...
TwoWire Wire
this is the well-known Arduino Wire Interface, just a little bit 'modified' ;P
bool changeBrightness(byte val=0x64)
changes the brightness of the display
bool changeID(optVAL_t newID=0x3C)
changes the address of the LCD display talked to
PROGMEM const byte basicFont[][8]
void print(const char *data)
prints a string to the display
void drawBitmap(const unsigned char *bitmap, byte posX, byte posY, byte hiX, byte hiY)
draws a bitmap representet as an array of bytes
[I2C] [LCD] This is used to add support for OLED displays connected to the 'SoccerBoard' ...
#define LCD_PAGE_ADDRESSING