I recently picked up an Arduino LCD shield kit from Adafruit. I’ve wanted to play around with some LCD screens and since this was a self contained kit for $20, I thought I’d try it out. Here’s my thoughts on it.
For this article I’m using an Arduino Mega 2560, obtained from Newark Element 14
The Arduino LCD Shield Kit
The kit comes with the following items:
In the kit we have:
- 5 Resistors
- Printed Circuit Board
- Header Pins
- i2c Port Expander Chip
It’s definitely a “turnkey” kit that comes with everything you need. The full assembly instructions show you how to build it, step by step.
Bust Out Your Soldering Iron!
For this kit you will need to do a considerable amount of soldering. Some folks aren’t a fan of this idea, but I love it. This is great for beginners so they can learn soldering techniques and get better at it. Even though this is a complete kit that could be easily shipped soldered and assembled, I think that would be cheating beginners out of the experience of assembly. Not to mention it frees you up to use only the parts you need, or even use them in something else.
You’re a hacker now, embrace it!
Assembling the Shield
For the first step you’ll want to solder on the resistors out of the kit in the following configuration:
An easy way to do this is pull the resistors down through the holes and cross the wires like so. Then once they are all through, solder each piece and trim off the ends.
Next, add the buttons. You’ll have to be careful with these pins as they are very close together.
Now, install the IC with the notch matching, as shown in the diagram:
Then break apart the header pins and insert them as shown:
You can now place the board on the Arduino so the pins match up.
Now you can solder the pins in. This gives you an interface to your Arduino, but mostly it’s just to keep the sheild stable. At this point you could add risers to the header pins for stacking other devices if you want.
Finally, you then solder on the LCD screen:
And you’re done!
Next we’ll cover how to put some text on the screen.
To output the message shown above, create a file with the following code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Pretty easy right? I hope the comments explain what’s going on. But we have some other buttons on there we want to work with. We’ll put the following in the loop:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
This code should be really straightforward. You can check to see if a button is pressed in the loop, and create code based on it. So let’s do something with that.
Turn an LED On and Off with Indicator
Here’s something to try, hook up an LED to a digital pin. I am using the Arduino Mega, and just put it in the board like this:
Now, create a file with the following code:
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
This is pretty straightforward stuff, not that we set “pinMode” to 53,OUTPUT. This is how we set up the pin to light up the LED with the digitalWrite function. By setting pin 53 to HIGH it powers it, and setting it to LOW stops it. The LCD screen then prints the status.
The possibilities are endless here!
Overall I think this product is a fantastic value. I’ve just barely scratched the surface of what can be done here, and it’s only $19.95. It could be a very valuable display for your projects. It’s easy to assemble and works great. So pick up an Arduino (I really like the Mega 2650) and an LCD shield and start tinkering! Contact me with any cool projects you create!
My New Course: Hands on Internet of Things with the Raspberry Pi
I have just released my new course titled ”Hands on Internet of Things” which is intended to be a course for people who want to get started with IoT. I’ll take you through blinking lights and reading sensors to creating YOUR own IoT endpoint and dashboard. I’m offering this special coupon for readers of my site: get %50 off this course here. Thanks for being a reader!