How to use LCDs with Arduino: An Introduction
In this series of lessons you are going to learn how to use Liquid Crystal Displays with Arduino. By the end of this training you will be able to understand and implement the following:
- How to connect an LCD module to an Arduino (Which pins go where).
- Familiarize yourself with the LiquidCrystal library so you can:
- Scroll text.
- Adjust the “All Mighty” Cursor (and understand how it works!).
- Blink the LCD screen or the characters displayed on it.
- A bunch of other things that you will want to know.
Let’s Get Started:
Having a display on your project can mean the difference between a great user experience and one that makes the user grit their teeth.
This is because how people (including you) interact with your project makes a huge difference in its success.
I have always been frightened by the idea of using a display because I thought it added a level of complexity I wasn’t ready for yet – to my delightful surprise – I was dead wrong, it’s a cinch even for a drunken monkey (if you can relate with me).
Truthfully – using LCDs with Arduino is incredibly easy and can integrate seamlessly into your project. (So give it a try!)
The Liquid Crystal library that comes preinstalled in your Arduino IDE is the key to making awesome things display. It is truly the crux of this series, without out which, using LCDs might not be as easy as you and I would prefer.
So why Liquid Crystal Displays?
(If you don’t need convinced you skip to the bottom)
I know – you are probably thinking…
“Michael, LCDs really?! Thats so 1970-80’s. What – did your swatch watch break and you are trying to fix it? Everyone uses touch screens now and you would be a recent ancestor of the dinosaurs if you didn’t too!”
Well my friend, let’s walk through a couple reasons why LCDs are the way to go for many projects.
If you are looking for a display, but want to keep costs low, then an LCD is a great option – especially for a one-off project. I bought mine for around $10 at Jameco. Chances are, you can find a great LCD module that fits your display size needs and also fits your budget.
LCDs are everywhere. They are in your automobile. They are in your household appliances. They are used everywhere in automation – you can’t sneeze in a factory and not get mucus on a shiny LCD screen.
What good does this do for us? Well – it means that they are going to be built and supported for a long time to come – so if yours breaks in a decade, chances are you can get another. It also means that there is a lot of support out there for LCDs. The fact that the Arduino IDE comes with a built in LCD library is one good indicator that people use these screens tons.
Ease of Use
This is my hot ticket. Because I want to display things, but I don’t want to figure out how to send someone to the moon to do it. My jaw dropped at how easy it is to use LCDs with Arduino – thanks to the LiquidCrystal library which comes preinstalled in the Arduino software.
And there is a lot you can do, as we will soon see.
So let’s get our hands dirty.
The following tutorials will walk you through everything you need to know to get up and running – best of luck! And remember – if you really want to learn – do the challenges at the end of each tutorial!
- Search online for some LCDs and see what is available in different colors, sizes and costs.