Hi all,
I am new to Arduino, and I have some questions about lcd screens.
Is it possible to code the lcd screen like in this image?
I tried but it seems like the lcd screen can only record 8 different characters ?
for reference this is my code, and the screen does not show up right.. is there a way to make this?
please help.. Thank you!
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
byte a[]={
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
B11111
};
byte b[]={
B00100,
B01000,
B01000,
B10000,
B10000,
B10000,
B10000,
B10000
};
byte c[]={
B00001,
B00010,
B00110,
B00100,
B01000,
B01000,
B10000,
B10000
};
byte d[]={
B10000,
B01000,
B01100,
B00100,
B00010,
B00010,
B00001,
B00001
};
byte e[]={
B00000,
B00000,
B00000,
B00000,
B00000,
B00000,
B00001,
B00011
};
byte f[]={
B00000,
B00000,
B00000,
B00000,
B00100,
B11111,
B00000,
B00000
};
byte g[]={
B00000,
B00000,
B00000,
B00000,
B00000,
B00000,
B10000,
B11000
};
byte h[]={
B00001,
B00010,
B00110,
B00100,
B01000,
B01000,
B10000,
B10000
};
byte i[]={
B10000,
B01000,
B01100,
B00100,
B00010,
B00010,
B00001,
B00001
};
byte j[]={
B00100,
B00010,
B00010,
B00001,
B00001,
B00001,
B00001,
B00001
};
byte k[]={
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
B11111
};
byte l[]={
B10000,
B10000,
B10000,
B10000,
B10000,
B01000,
B01000,
B00100
};
byte m[]={
B00011,
B00011,
B00001,
B00000,
B00000,
B00000,
B00000,
B00000
};
byte n[]={
B00000,
B00000,
B00000,
B11111,
B00100,
B00000,
B00000,
B00000
};
byte o[]={
B11000,
B11000,
B10000,
B00000,
B00000,
B00000,
B00000,
B00000
};
byte p[]={
B00001,
B00001,
B00001,
B00001,
B00001,
B00010,
B00010,
B00100
};
void setup() {
lcd.begin(16,2);
lcd.createChar(0,a);
lcd.createChar(1,b);
lcd.createChar(2,c);
lcd.createChar(3,d);
lcd.createChar(4,e);
lcd.createChar(5,f);
lcd.createChar(6,g);
lcd.createChar(7,h);
lcd.createChar(8,i);
lcd.createChar(9,j);
lcd.createChar(10,k);
lcd.createChar(11,l);
lcd.createChar(12,m);
lcd.createChar(13,n);
lcd.createChar(14,o);
lcd.createChar(15,p);
}
void loop() {
lcd.setCursor(2,0);
lcd.write(byte(0));
lcd.setCursor(3,0);
lcd.write(byte(1));
lcd.setCursor(4,0);
lcd.write(byte(2));
lcd.setCursor(5,0);
lcd.write(byte(3));
lcd.setCursor(6,0);
lcd.write(byte(4));
lcd.setCursor(7,0);
lcd.write(byte(5));
lcd.setCursor(8,0);
lcd.write(byte(6));
lcd.setCursor(9,0);
lcd.write(byte(7));
lcd.setCursor(10,0);
lcd.write(byte(8));
lcd.setCursor(11,0);
lcd.write(byte(9));
lcd.setCursor(12,0);
lcd.write(byte(10));
lcd.setCursor(3,1);
lcd.write(byte(11));
lcd.setCursor(6,1);
lcd.write(byte(12));
lcd.setCursor(7,1);
lcd.write(byte(13));
lcd.setCursor(8,1);
lcd.write(byte(14));
lcd.setCursor(11,1);
lcd.write(byte(15));
}