// LCD1602 to Arduino Uno connection example
//MACHINE PROB
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
char *array1[] = {"Bulacan State", "University","is a progressive","knowledge-","generating","institution","globally","recognized","for excellent", "instruction,","pioneering", "research","and responsive", "community" ,"engagements"};
char *array2[] = {"Bulacan State", "University","exists to","produce highly","competent","ethical and","service-oriented","professionals","that contribute","to the","sustainable", "socio-economic" ,"growth and","development of","the nation"};
char *array3[] = {"1.Quality and", "Excellence.", "2.Relevance and", "Responsiveness.","3.Access and", "Equity.","4.Efficiency and", "Effectiveness"};
char *array4[] = {"1.(S)ervice to","God and", "Community.","2.(O)rder and","Peace.","3.(A)ssurance to","Quality and","Accountability.","3.(R)respect and","Responsibility.","S O A R!"};
char *array5[] = {"Thank you ^_^"};
int timer = 780;
LiquidCrystal_I2C lcd(0x27, 16, 2);
byte Heart[8] = {
0b00000,
0b01010,
0b11111,
0b11111,
0b01110,
0b00100,
0b00000,
0b00000
};
byte Check[8] = {
0b00000,
0b00001,
0b00011,
0b10110,
0b11100,
0b01000,
0b00000,
0b00000
};
void setup()
{
lcd.init();
lcd.backlight();
lcd.begin(16, 2);
lcd.createChar(0, Heart);
lcd.createChar(3, Check);
}
void loop()
{
lcd.setCursor(0, 0);
lcd.write(byte(0));
lcd.setCursor(1,0);
lcd.print("BulSU VISION:");
delay(timer*2);
lcd.clear();
delay(timer*2);
for (int positionCounter1 = 0; positionCounter1 < 17; positionCounter1++)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print(array1[positionCounter1]);
delay(timer);
}
{
lcd.setCursor(0, 0);
lcd.write(byte(0));
lcd.setCursor(1,0);
lcd.print("BulSU MISSION:");
delay(timer*2);
lcd.clear();
delay(timer*2);
for (int positionCounter1 = 0; positionCounter1 < 15; positionCounter1++)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print(array2[positionCounter1]);
delay(timer);
}
lcd.setCursor(0, 0);
lcd.write(byte(3));
lcd.setCursor(1,0);
lcd.print("BulSU GOALS:");
delay(timer*2);
lcd.clear();
delay(timer*2);
for (int positionCounter1 = 0; positionCounter1 < 8; positionCounter1++)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print(array3[positionCounter1]);
delay(timer);
}
lcd.setCursor(0, 0);
lcd.write(byte(3));
lcd.setCursor(1,0);
lcd.print("CORE VALUES:");
delay(timer*2);
lcd.clear();
delay(timer*2);
for (int positionCounter1 = 0; positionCounter1 < 11; positionCounter1++)
{
lcd.clear();
lcd.setCursor(0,0);
lcd.print(array4[positionCounter1]);
delay(timer);
}
lcd.clear();
lcd.setCursor(0,16);
for (int positionCounter1 = 0; positionCounter1 < 6; positionCounter1++)
{
lcd.scrollDisplayRight();
lcd.print(array5[positionCounter1]);
delay(timer);
}
lcd.clear();
}
}
/* LAB PRC 1
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
lcd.init();
lcd.backlight();
lcd.begin(16, 2);
}
void loop() {
lcd.setCursor(1,0);
lcd.print("EMBEDDED");
lcd.setCursor(5,1);
lcd.print("SYSTEM");
}*/
/*LAB PRC 2
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup()
{
lcd.begin(16, 0);
// Print a message to the LCD.
lcd.backlight();
lcd.setCursor(0,0);
lcd.print(" Embedded System ");
}
void loop()
{
lcd.setCursor(16,1);
lcd.autoscroll(); // Set diplay to scroll automatically
lcd.print(" "); // set characters
delay(300);
}*/
/* LAB PRC 3
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
char array1[]="Embedded System";
char array2[]="Arduino LCD";
int timer = 400;
LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() {
lcd.init();
lcd.backlight();
}
void loop() {
lcd.setCursor(16,0);
for (int positionCounter1 = 0; positionCounter1 < 20; positionCounter1++)
{
lcd.scrollDisplayLeft();
lcd.print(array1[positionCounter1]);
delay(timer);
}
lcd.clear();
lcd.setCursor(12,1);
for (int positionCounter2 = 0; positionCounter2 < 20; positionCounter2++)
{
lcd.scrollDisplayLeft();
lcd.print(array2[positionCounter2]);
delay(timer);
}
lcd.clear();
}*/
/* LAB PRC 4
#include <LiquidCrystal_I2C.h>
#include <Wire.h>
LiquidCrystal_I2C lcd(0x27, 16, 2);
// make some custom characters:
byte Heart[8] = {
0b00000,
0b01010,
0b11111,
0b11111,
0b01110,
0b00100,
0b00000,
0b00000
};
byte Bell[8] = {
0b00100,
0b01110,
0b01110,
0b01110,
0b11111,
0b00000,
0b00100,
0b00000
};
byte Alien[8] = {
0b11111,
0b10101,
0b11111,
0b11111,
0b01110,
0b01010,
0b11011,
0b00000
};
byte Check[8] = {
0b00000,
0b00001,
0b00011,
0b10110,
0b11100,
0b01000,
0b00000,
0b00000
};
byte Speaker[8] = {
0b00001,
0b00011,
0b01111,
0b01111,
0b01111,
0b00011,
0b00001,
0b00000
};
byte Sound[8] = {
0b00001,
0b00011,
0b00101,
0b01001,
0b01001,
0b01011,
0b11011,
0b11000
};
byte Skull[8] = {
0b00000,
0b01110,
0b10101,
0b11011,
0b01110,
0b01110,
0b00000,
0b00000
};
void setup()
{
// initialize LCD and set up the number of columns and rows:
lcd.init();
lcd.backlight();
lcd.begin(16, 2);
// create a new character
lcd.createChar(0, Heart);
lcd.createChar(1, Bell);
lcd.createChar(2, Alien);
lcd.createChar(3, Check);
lcd.createChar(4, Speaker);
lcd.createChar(5, Sound);
lcd.createChar(6, Skull);
lcd.clear();
// Print a message to the lcd.
lcd.print("Custom Character");
}
// Print All the custom characters
void loop()
{
lcd.setCursor(0, 1);
lcd.write(byte(0));
lcd.setCursor(2, 1);
lcd.write(byte(1));
lcd.setCursor(4, 1);
lcd.write(byte(2));
lcd.setCursor(6, 1);
lcd.write(byte(3));
lcd.setCursor(8, 1);
lcd.write(byte(4));
lcd.setCursor(10, 1);
lcd.write(byte(5));
lcd.setCursor(12, 1);
lcd.write(byte(6));
}*/