public
Last active

How to display like http://i.imgur.com/35Ikw.jpg

  • Download Gist
LCD example code.ino
Arduino
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
#include <LiquidCrystal.h>
 
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
 
String one = "Target Temp";
String two = "Current Temp";
 
byte degreesf[8] = {
0b11000,
0b11000,
0b00111,
0b00100,
0b00111,
0b00100,
0b00100,
0b00000
};
 
byte degreesc[8] = {
0b11000,
0b11000,
0b00011,
0b00100,
0b00100,
0b00100,
0b00011,
0b00000
};
 
void setup() {
one.toUpperCase();
two.toUpperCase();
 
lcd.createChar(0, degreesf);
lcd.createChar(1, degreesc);
 
lcd.begin(16, 2);
 
lcd.setCursor(0, 0);
lcd.print(one);
lcd.setCursor(15, 0);
lcd.write((uint8_t)0);
 
lcd.setCursor(0, 1);
lcd.print(two);
lcd.setCursor(15, 1);
lcd.write((uint8_t)0);
}
 
void loop() {
lcd.setCursor(13, 0);
lcd.print(72);
 
lcd.setCursor(13, 1);
lcd.print(68);
}

sorry to say but this doesn't work at all. i can't see anything in the lcd. no display.

i made the following connections:

lcd arduino uno r3
vss gnd(common gnd via breadboard)
vdd +5v(common via breadboard)
vo potentiometer(wiper pin) 10kOhms
rs 12
rw gnd(common via breadboard)
e 11
d0 no connection
d1 no connection
d2 no connection
d3 no connection
d4 5
d5 4
d6 3
d7 2
a +5v(common via breadboard)
k potentiometer(wiper pin) 10kOhms

I did these connections and then uploaded the sketch to arduino, but i get no display at all. I mean i see the lcd showing all the coloums and rows together, but no characters as it should. This is the problem, i can't get it to work. I tried thousands of other ways, then found yours, but even yours couldn't get it working.

What shall i do now ?

Hey thanks it worked, i added a resistor to the 15th pin of lcd, rather than direct +5v. now its getting 4.2v and i have a proper display for the 1st time. Thanks bro.

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.