Hi!
For about a week or two ago I bought the arduino starter kit, or maybe it was three or four weeks, I really can't keep any track of it. However I have gotten to the project where you learn LCDs and after some time now, I am starting to get into the more "complex" stuff I guess. When I say complex I mostly mean custom characters and so on. And today I wanted to write "Samuel's display" and have a progress bar underneath. I tried using this code:
#include <LiquidCrystal.h>
LiquidCrystal lcd (12,11,5,4,3,2);
byte p20[8] = {
B10000,
B10000,
B10000,
B10000,
B10000,
B10000,
B10000,
};
byte p40[8] = {
B11000,
B11000,
B11000,
B11000,
B11000,
B11000,
B11000,
};
byte p60[8] = {
B11100,
B11100,
B11100,
B11100,
B11100,
B11100,
B11100,
};
byte p80[8] = {
B11110,
B11110,
B11110,
B11110,
B11110,
B11110,
B11110,
};
byte p100[8] = {
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
B11111,
};
void setup() {
lcd.begin(16,2);
lcd.setCursor(0,0);
lcd.print("Intializing");
lcd.setCursor(11,0);
delay(500);
lcd.print(".");
lcd.setCursor(12,0);
delay(500);
lcd.print(".");
lcd.setCursor(13, 0);
delay(500);
lcd.print(".");
delay(3000);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("Samuel's display");
lcd.createChar(0, p20);
lcd.createChar(1, p40);
lcd.createChar(2, p60);
lcd.createChar(3, p80);
lcd.createChar(4, p100);
}
void loop() {
lcd.setCursor(0,1);
lcd.print(" ");
for(int i; i < 16; i++) {
for (int j; j < 5; j++) {
lcd.setCursor(i,1);
lcd.write(byte(j));
delay(100);
}
}
}
But it did not work, so much question pretty much is, is it my code or is it the LCD that is messing with me? Because it displays "Samuel's display" and "Initializing" but the progress bar does not show up. Thanks for any help regarding this problem.
Samuel