So I wanted to make a LCD that displays the temp but the LCD isn't displaying the text. Since this didnt work i tried following a tutorial for my LCD. The LCD doesnt display the white boxes nor the text.
/*
LiquidCrystal Library - Hello World
Demonstrates the use a 16x2 LCD display. The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.
This sketch prints "Hello World!" to the LCD
and shows the time.
The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* LCD R/W pin to ground
* LCD VSS pin to ground
* LCD VCC pin to 5V
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)
Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe
modified 7 Nov 2016
by Arturo Guadalupi
This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/LiquidCrystalHelloWorld
*/
// include the library code:
#include <LiquidCrystal.h>
// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to
const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis() / 1000);
}
I bought a new LCD thinking mine was just broken but my new one does the same thing. My potentiometer was missing a piece so I just hooked up v0 to 3.3v. Here is the link to the tutorial I used: https://www.arduino.cc/en/Tutorial/LibraryExamples/HelloWorld
From your picture it appears you do not have enough wires connected. Draw a schematic, not a frizzy thing and be sure you have wired to your schematic. Show all power and ground connections as well as all interconnections. Count your connections and the ones in the link they are not the same.
Stoutscientist:
So I wanted to make a LCD that displays the temp but the LCD isn't displaying the text. Since this didn't work i tried following a tutorial for my LCD. The LCD doesn't display the white boxes nor the text.
Which means the contrast is not set.
Stoutscientist:
I bought a new LCD thinking mine was just broken but my new one does the same thing. My potentiometer was missing a piece
Waht on earth does that mean?
Stoutscientist:
so I just hooked up v0 to 3.3v.
Which is useless.
A longstanding error in circuits mindlessly copied from one "tutorial" to another by people who do not understand what the contrast control is, has the contrast potentiometer connected to 5 V - Vcc. You must not connect the contrast control - "Vo" to 5 V, or even 3.3 V. If lacking the potentiometer, you connect "Vo" to ground, it will likely work just fine. A 1k variable resistor (potentiometer with only one end and the wiper connected) is the correct contrast control, or if you have a 10k potentiometer, connect the wiper to "Vo" and both ends to ground!.
If you have some resistors in the range of 47 to 680 Ohms, just try different values between "Vo" and ground, see which is best and use that.
Now if you need to take a photo of your arrangement, take it out of your dark dungeon, outside into full daylight but not full sun. Preferably with a proper camera with good focus.
Well, I don't know about the stupid bit because as I say, the persistent mistake in the potentiometer wiring shows that no-one who has copied the bad design from somewhere else actually understood how the contrast control works either!
Please do describe what you did from the options I provided and how well it is working now. Maybe a photo?
When I saw this I realized I needed v0 to be ground not 3.3v lol. Thank you so much for your help sorry it took so long to reply (also the reason it doesn't say the temp is because I'm still coding it.
Well done. All working then.
I would like to mention that you don't have to have all those wires. You might need some IO ports for other things....
There is a small device you can buy called a "I2C Serial Interface Module" that is specifically designed to connect 1602 LCDs using I2C. That means you need only 2 wires for the signals.
There is even a library called LiquidCrystal_I2C.h to help you do that.
Those adapters are also at very low cost...
IMHO, it's much easier this way! Hope that helps to tidy up with wiring.