Hey folks
For a school project I'm programming a few emoticons. Each of them is over four fields. I've done this for 4 smileys now. first worked. second also. but since the third it doesnt work anymore: first smiley should be but is :). 4th isnt displayed right. I culdnt find any mistake in the code, hope You can :).
#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
byte A[8] = { //
0b00000,
0b00000,
0b11100,
0b11100,
0b11100,
0b00000,
0b00000,
0b00000
};
byte B[8] = {
0b00011,
0b00110,
0b01100,
0b01100,
0b11000,
0b11000,
0b11000,
0b11000
};
byte C[8] = {
0b00000,
0b00000,
0b00000,
0b11100,
0b11100,
0b11100,
0b00000,
0b00000
};
byte D[8] = {
0b11000,
0b11000,
0b11000,
0b11000,
0b01100,
0b01100,
0b00110,
0b00011
};
byte E[8] = { //
0b00001,
0b00001,
0b11101,
0b11101,
0b11101,
0b00001,
0b00001,
0b00001
};
byte F[8] = {
0b11000,
0b11100,
0b10110,
0b10110,
0b10011,
0b10011,
0b10011,
0b10011
};
byte G[8] = {
0b00001,
0b00001,
0b00001,
0b11101,
0b11101,
0b11101,
0b00001,
0b00001
};
byte H[8] = {
0b10011,
0b10011,
0b10011,
0b10011,
0b10110,
0b10110,
0b11100,
0b11000
};
byte I[8] = { //
0b00000,
0b00000,
0b11100,
0b11100,
0b11100,
0b00000,
0b00000,
0b00000
};
byte J[8] = {
0b11000,
0b01100,
0b00110,
0b00110,
0b00011,
0b00011,
0b00011,
0b00011
};
byte K[8] = {
0b00000,
0b00000,
0b00000,
0b11100,
0b11100,
0b11100,
0b00000,
0b00000
};
byte L[8] = {
0b00011,
0b00011,
0b00011,
0b00011,
0b00110,
0b00110,
0b01100,
0b11000
};
byte M[8] = { //
0b00000,
0b00000,
0b11100,
0b11100,
0b11100,
0b00000,
0b00000,
0b00000
};
byte N[8] = {
0b00000,
0b00000,
0b01110,
0b10001,
0b10001,
0b10001,
0b10001,
0b10001
};
byte O[8] = {
0b00000,
0b00000,
0b00000,
0b11100,
0b11100,
0b11100,
0b00000,
0b00000
};
byte P[8] = {
0b10001,
0b10001,
0b10001,
0b10001,
0b10001,
0b01110,
0b00000,
0b00000
};
void setup() {
lcd.begin(16,2);
lcd.createChar(1,A);
lcd.createChar(2,B);
lcd.createChar(3,C);
lcd.createChar(4,D);
lcd.createChar(5,E);
lcd.createChar(6,F);
lcd.createChar(7,G);
lcd.createChar(8,H);
lcd.createChar(9,I);
lcd.createChar(10,J);
lcd.createChar(11,K);
lcd.createChar(12,L);
lcd.createChar(13,M);
lcd.createChar(14,N);
lcd.createChar(15,O);
lcd.createChar(16,P);
}
void loop() {
lcd.setCursor(0,0);
lcd.write(1);
lcd.setCursor(1,0);
lcd.write(2);
lcd.setCursor(0,1);
lcd.write(3);
lcd.setCursor(1,1);
lcd.write(4);
lcd.setCursor(2,0);
lcd.write(5);
lcd.setCursor(3,0);
lcd.write(6);
lcd.setCursor(2,1);
lcd.write(7);
lcd.setCursor(3,1);
lcd.write(8);
lcd.setCursor(4,0);
lcd.write(9);
lcd.setCursor(5,0);
lcd.write(10);
lcd.setCursor(4,1);
lcd.write(11);
lcd.setCursor(5,1);
lcd.write(12);
lcd.setCursor(6,0);
lcd.write(13);
lcd.setCursor(7,0);
lcd.write(14);
lcd.setCursor(6,1);
lcd.write(15);
lcd.setCursor(7,1);
lcd.write(16);
}