Custom character in LCD | Amazing Mj
Custom character in LCD
Code :-
//this code is modified by Meet Patel(amazing mj)
//tutorial video is available in "Amazing Mj" youtube channel link of the video given below the code.
// THINK AMAZING
// BE AMAZING
#include <LiquidCrystal.h>
LiquidCrystal lcd(A5, A4, A3, A2, A1, A0);
byte smiley[8] = {
0b00000,
0b00000,
0b01010,
0b00000,
0b00000,
0b10001,
0b01110
0b00000
};
byte ohm[8] = {
0b00000,
0b00000,
0b01110,
0b10001,
0b10001,
0b01010,
0b11011,
0b00000
};
byte bell[8] = {
0b00000,
0b00100,
0b01110,
0b01110,
0b01110,
0b11111,
0b00100,
0b00000
};
byte heart[8] = {
0b00000,
0b01010,
0b11111,
0b11111,
0b11111,
0b01110,
0b00100,
0b00000
};
byte cell[8] = {
0b01010,
0b01010,
0b11111,
0b11111,
0b11111,
0b11111,
0b11111,
0b11111
};
byte dots[8] = {
0b01010,
0b10101,
0b01010,
0b10101,
0b01010,
0b10101,
0b01010,
0b10101
};
byte plug[8] = {
0b01010,
0b01010,
0b11111,
0b10001,
0b10001,
0b01110,
0b00100,
0b00100
};
byte lock[8] = {
0b01110,
0b10001,
0b10001,
0b11111,
0b11111,
0b11011,
0b11011,
0b11111
};
byte unlock [8] = {
0b01110,
0b10000,
0b10000,
0b11111,
0b11111,
0b11011,
0b11011,
0b11111
};
byte music[8] = {
0b00000,
0b00001,
0b00011,
0b00101,
0b01001,
0b10011,
0b11011,
0b11000
};
void setup() {
lcd.begin(16, 2);
lcd.createChar(01, smiley);
lcd.setCursor(0, 0);
lcd.write(01);
lcd.createChar(2, plug);
lcd.setCursor(2, 0);
lcd.write(2);
lcd.createChar(3, ohm);
lcd.setCursor(4, 0);
lcd.write(3);
lcd.createChar(4, bell);
lcd.setCursor(6, 0);
lcd.write(4);
lcd.createChar(5, heart);
lcd.setCursor(8, 0);
lcd.write(5);
lcd.createChar(6, cell);
lcd.setCursor(7, 1);
lcd.write(6);
lcd.createChar(7, dots);
lcd.setCursor(9, 1);
lcd.write(7);
lcd.createChar(8, lock);
lcd.setCursor(11, 1);
lcd.write(8);
lcd.createChar(9, unlock);
lcd.setCursor(13, 1);
lcd.write(9);
lcd.createChar(10, music);
lcd.setCursor(15, 1);
lcd.write(10);
}
void loop() {
}
//tutorial video is available in "Amazing Mj" youtube channel link of the video given below the code.
// THINK AMAZING
// BE AMAZING
#include <LiquidCrystal.h>
LiquidCrystal lcd(A5, A4, A3, A2, A1, A0);
byte smiley[8] = {
0b00000,
0b00000,
0b01010,
0b00000,
0b00000,
0b10001,
0b01110
0b00000
};
byte ohm[8] = {
0b00000,
0b00000,
0b01110,
0b10001,
0b10001,
0b01010,
0b11011,
0b00000
};
byte bell[8] = {
0b00000,
0b00100,
0b01110,
0b01110,
0b01110,
0b11111,
0b00100,
0b00000
};
byte heart[8] = {
0b00000,
0b01010,
0b11111,
0b11111,
0b11111,
0b01110,
0b00100,
0b00000
};
byte cell[8] = {
0b01010,
0b01010,
0b11111,
0b11111,
0b11111,
0b11111,
0b11111,
0b11111
};
byte dots[8] = {
0b01010,
0b10101,
0b01010,
0b10101,
0b01010,
0b10101,
0b01010,
0b10101
};
byte plug[8] = {
0b01010,
0b01010,
0b11111,
0b10001,
0b10001,
0b01110,
0b00100,
0b00100
};
byte lock[8] = {
0b01110,
0b10001,
0b10001,
0b11111,
0b11111,
0b11011,
0b11011,
0b11111
};
byte unlock [8] = {
0b01110,
0b10000,
0b10000,
0b11111,
0b11111,
0b11011,
0b11011,
0b11111
};
byte music[8] = {
0b00000,
0b00001,
0b00011,
0b00101,
0b01001,
0b10011,
0b11011,
0b11000
};
void setup() {
lcd.begin(16, 2);
lcd.createChar(01, smiley);
lcd.setCursor(0, 0);
lcd.write(01);
lcd.createChar(2, plug);
lcd.setCursor(2, 0);
lcd.write(2);
lcd.createChar(3, ohm);
lcd.setCursor(4, 0);
lcd.write(3);
lcd.createChar(4, bell);
lcd.setCursor(6, 0);
lcd.write(4);
lcd.createChar(5, heart);
lcd.setCursor(8, 0);
lcd.write(5);
lcd.createChar(6, cell);
lcd.setCursor(7, 1);
lcd.write(6);
lcd.createChar(7, dots);
lcd.setCursor(9, 1);
lcd.write(7);
lcd.createChar(8, lock);
lcd.setCursor(11, 1);
lcd.write(8);
lcd.createChar(9, unlock);
lcd.setCursor(13, 1);
lcd.write(9);
lcd.createChar(10, music);
lcd.setCursor(15, 1);
lcd.write(10);
}
void loop() {
}
//end
Video link :- https://youtu.be/EOFGcpuroYY
Video link :- https://youtu.be/EOFGcpuroYY
kjhipugo8tv ig8uhmn pgpu biup98y
ReplyDelete