Getting Things to Talk: Arduino + LCDs

I spent the better part of the day on Saturday doing some more basic research into connecting an Arduino and LCD for this ongoing project. For the most part, it’s pretty basic and following the wiring diagrams and tutorials online is fine. I ran into a problem with getting text on two lines, which I’ll detail below. Next on the to do list is to order a different LCD, maybe a 4×20 display and maybe something even smaller and then do some work on the text processing part of this whole thing. Overall, it was a good start and I’m anxious for later this week when I’ll have a block of time to continue with the next steps in this early research. First thing after pulling this stuff out again, I followed the wiring diagrams and I connected the data wires, leaving the power and ground until the end.Getting Things to Talk Arduino  LCDs

An initial sketch. Really, really basic “hello, world!” program. However, this was before I installed the newest version of Arduino, which is why that error came up.

Installing version 0017 helped and I finished connecting the LCD.

It’s not ideal, but quick and dirty. Also, it seems like there are better screens out there in terms of connections.

The arduino side of things.

I figured that it would be better to not be so tightly tethered to the Arduino, so I used the breadboard.

Trying to make connections a little cleaner.

My first program, working!

All the wires, still a mess, but I was just too anxious to get something on the screen.

Then I worked on another program that would flash different texts.

This one switched between BCL and make things happen!

Here’s the code, trying also to change the position of the cursor, which didn’t work as anticipated because I didn’t initialize the screen with lcd.begin().

I switched the wiring around to try to figure out how to get text on two lines. Lots of confusion, I just couldn’t get two lines to work, so I went back to one line. I had momentarily wondered why I couldn’t get any decent contrast on the screen when trying to use two lines and the lcd.begin() line in my code. I wondered if it was just my poor connections, so I tried a bit of soldering, but it didn’t help. I went back to the drawing board, trying different wiring set up again.

I can’t seem to get the correct contrast when using the lcd.begin() line, that is to say that at a very severe angle it’s possible to read the screen, but under normal viewing it’s no where near what it should be (as pictured above). I didn’t post a picture of that because it basically just looks like the backlight is on with nothing on the screen itself. I couldn’t find an answer online, so I’m going to try this again with a different LCD. Although it could be a number of other things, this seems to be the simplest way to move forward. All these screens are based on the Hitachi HD44780 LCD, so it shouldn’t be an issue, but I’m not sue what else could be causing the problem at the moment… As frustrating as it can be sometimes, I think troubleshooting is where I learn the most.Getting Things to Talk Arduino  LCDs Schematic

Here’s a bit of an annotated bibliography: (for whatever reason, this was the most successful wiring setup, though I have my suspicions that I messed up the contrast at some point due to my shoddy and impermanent wiring) (a diagram for the wiring setup recommended on the Arduino site) (a quick example of using the 4-bit LCD library, I haven’t tried it) (interesting project connecting twitter and Arduino) (lots of interesting projects, hooking up Arduino + Twitter and Gmail + Arduino using Python) (some helpful troubleshooting stuff) (analog write, I used this to correct the contrast problem I had) (LCD library for Arduino)


For more detail: Getting Things to Talk: Arduino + LCDs

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top