// include the library code:
#include <LiquidCrystal.h>
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
//Jempol
byte customChar0[8] = {
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00011
};
byte customChar1[8] = {
0b00000,
0b01100,
0b10010,
0b10010,
0b10001,
0b01000,
0b11100,
0b00000
};
byte customChar2[8] = {
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b10000,
0b01000,
0b00110
};
byte customChar3[8] = {
0b00100,
0b00011,
0b00100,
0b00011,
0b00100,
0b00011,
0b00010,
0b00001
};
byte customChar4[8] = {
0b00000,
0b11000,
0b00000,
0b11000,
0b00000,
0b11000,
0b00001,
0b11110
};
byte customChar5[8] = {
0b00010,
0b00010,
0b00010,
0b00010,
0b00010,
0b01110,
0b10000,
0b00000
};
/*
//JempJoypad
byte customChar0[8] = {
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b00011,
0b00100
};
byte customChar1[8] = {
0b00001,
0b00010,
0b00100,
0b00100,
0b01110,
0b01010,
0b11111,
0b01110
};
byte customChar2[8] = {
0b10000,
0b01001,
0b00110,
0b00000,
0b00000,
0b00000,
0b11000,
0b00100
};
byte customChar3[8] = {
0b01000,
0b10000,
0b10010,
0b10101,
0b10010,
0b10000,
0b01000,
0b00111
};
byte customChar4[8] = {
0b00000,
0b00000,
0b00000,
0b00000,
0b00000,
0b01110,
0b10001,
0b00000
};
byte customChar5[8] = {
0b00010,
0b00001,
0b10101,
0b00001,
0b10101,
0b00001,
0b00010,
0b11100
};
*/
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
lcd.createChar(0, customChar0);
lcd.createChar(1, customChar1);
lcd.createChar(2, customChar2);
lcd.createChar(3, customChar3);
lcd.createChar(4, customChar4);
lcd.createChar(5, customChar5);
lcd.setCursor(0,0);
lcd.write((byte)0);
lcd.setCursor(1,0);
lcd.write((byte)1);
lcd.setCursor(2,0);
lcd.write((byte)2);
lcd.setCursor(4,0);
lcd.print("xx");
lcd.setCursor(0,1);
lcd.write((byte)3);
lcd.setCursor(1,1);
lcd.write((byte)4);
lcd.setCursor(2,1);
lcd.write((byte)5);
lcd.setCursor(4,1);
lcd.print("N.I.M");
/*
// Print a message to the LCD.
lcd.createChar(0, customChar);
lcd.createChar(1, customChar1);
lcd.createChar(2, customChar2);
lcd.createChar(3, customChar3);
lcd.createChar(4, customChar4);
lcd.createChar(5, customChar5);
lcd.setCursor(5, 0);
lcd.write((byte)2);
lcd.setCursor(6, 0);
lcd.write((byte)3);
lcd.setCursor(7, 0);
lcd.write((byte)0);
lcd.setCursor(8, 0);
lcd.write((byte)1);
lcd.setCursor(9, 0);
lcd.write((byte)4);
lcd.setCursor(10, 0);
lcd.write((byte)5);
lcd.setCursor(3,1);
lcd.write("KelompokXX");*/
}
void loop() {
/*for (int i=0;i<=10;i++)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Nomor :");
lcd.setCursor(8,0);
lcd.print(i);
delay(1000);
}
*/
}