// 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 layar(rs, en, d4, d5, d6, d7);
byte customChar0[8] = { //Love
0b00000,
0b01010,
0b11111,
0b11111,
0b01110,
0b00100,
0b00000,
0b00000
};
byte customChar1[8] = { //Arrow Atas
0b00100,
0b01110,
0b11111,
0b00100,
0b00100,
0b00100,
0b00100,
0b00100
};
byte customChar2[8] = { //Arrow Bawah
0b00100,
0b00100,
0b00100,
0b00100,
0b00100,
0b11111,
0b01110,
0b00100
};
void setup() {
// set up the LCD's number of columns and rows:
layar.begin(16, 2);
layar.createChar(0, customChar0); // create a new custom character (index 0)
layar.createChar(1, customChar1); // create a new custom character (index 1)
layar.createChar(2, customChar2); // create a new custom character (index 2)
}
void loop() {
layar.setCursor(6, 0); // move cursor to (6, 0)
layar.write((byte)0); // print the custom char 0 at (6, 0)
layar.setCursor(7, 0);
layar.write((byte)2);
layar.setCursor(8, 0);
layar.write((byte)0);
layar.setCursor(9, 0);
layar.write((byte)2);
layar.setCursor(10, 0);
layar.write((byte)0);
// for (int i=0; i>16; i++){
// layar.clear();
layar.setCursor(3,1);
layar.print("Kelompok07");
// }
}