I've seen many pages about how to wire up an LCD panel to an Arduino, and pages that help you draw custom characters, but I didn't see many that used the custom character function for animation.
What you'll need for this:
- Arduino Uno
- HD44780-compatible LCD
- Solderless breadboard (prototyping breadboard)
- One 10K ohm resistor
- One 10K ohm potentiometer
- Soldering iron and soldering materials
Optional parts, if you solder your LCD to a separate board:
- Another small breadboard with at least two rows and sixteen holes per row (optional)
- A 16-pin female header or something similar (chip sockets, for example)
Even if you don't solder your LCD to a separate board, you'll probably need a 16-pin row of male-male headers so you can stick your LCD directly into a solderless breadboard.
Why do this little bit of hackery? There's no great utility in doing things this way for general pixel animation purposes. For that, you need a real LCD display, not a basic text display. However, the overall technique might be of interest to those with limited display componentry, and a need for some kind of animated progress or level indicator.
Step 1: Wire the LCD to the breadboard
You can find other Instructables that explain how to do this step, which is to the first step for connecting the LCD panel to your Arduino. Before you can do that, you have to have some wires or headers stuck to your LCD panel's pin holes.
I was fortunate enough to find an LCD connected to a breadboard that someone else had used, apparently as their own soldering project. (I got it at the Tech Shop, Menlo Park / mid-Peninsula, in the donation bins!) It was a chunky little thing with two rows of seven pins on one end, and wires to "RA" and "RK" on the other end. Other panels are out there that have all the pins in one row, and they're much easier to connect to a solderless breadboard. But for mine, it already had wires connected to it, and those wires were too thin to stay in a solderless breadboard properly, so I chose to disconnect it from its old board, and solder its wires to my own breadboard, and then connect that to a solderless breadboard.
I cut the wires that connected the LCD to the old board, preserving as much connected wire as possible. Then, I cut all the wires so that they were roughly the same length. After that, I stripped the wires for through-hole soldering.
If you look on the back of the panel, you'll see that there are numbers indicating pins 1, 2, 13, and 14, so it was clear where each pin was. If you're wiring one of these on your own, I highly recommend using wires of different colors so you don't get things mixed up. The first time I did this, I reverse every pair of wires starting with wire 3, and had to undo and redo nearly everything.
I gently bent the wires and inserted the bare pins into the board. I did all the odd-numbered wires first, inserting all of them into their holes, and soldered pins 1 and 13 only to keep things in place. Then, I inserted all the even-numbered wires, and soldered 2 and 14. From there, everything was held in place well enough so that I could go down the line and solder each one in turn.
I then added the row of push-in headers. In my case, there were many more than sixteen holes, so I chose to leave the first empty, and just solder it and the last pin, simply to anchor the whole black bar to the board. I then soldered each of the pins to the breadboard.
Finally, I bent each of the blue wire tips towards its corresponding header pin, and I added solder bridges between each pair.
After that, I tested each pair of headers for connectivity to make sure I hadn't made any mistakes. I couldn't test the full connection from the header to the actual LCD pin very easily, so I had to trust that that had been done properly.