To start off on this project, I first made sure that I had my LCD hooked up correctly with the Arduino, so I ran Joel Murphy’s code that he supplied via e-mail. All went ok (I did have to delete a line or two of code in the variable definition area because they were not closed with semicolons).
After that, I found out how many pixels there were per section on the LCD, so I took a look at the Serial LCD documentation off of the Parallax website. Each square is 8 x 5, and there are 32 squares. So I did some sketches of what I wanted to make with my custom character:
I decided to do a sine wave, and I used a conversion table from ASCII.ci to assign codes for my custom character. You can see the conversion table that I used here. In order to do a sine wave, I created 4 custom characters. Here is a photo of my custom characters on the LCD:
For the animation of it, I decided to print through each permutation backwards to give the effect that the sine wave was moving forwards. You can see a video of the animation here:


6 Comments
hey ryan,
did u have to change the delay to anything else? There is only one wire going to pin 3 of the Atmega chip(arduino pin 1 ) right ?
Amber,
I didn’t need to mess with the delay. The program that Joel sent has one wire going to Digital Pin 2 (which is the 3rd pin in on the Arduino Board or the 4th pin in if you are using your chip in the Breadboard).
If you’re not getting anything going from Joel’s code, double check to make sure you have the correct “mode” set on the back of the LCD. There are 4 modes (test, 2400, 9600, and 19200). I used the 9600 setting.
Good luck!
Thanks Ryan, i found the problem. I was using a 20MHZ crystal. The clocking on my chip was off.
For those interested, here is a link to my code:
http://a.parsons.edu/~raffr046/homework/fall2009/physicalcomputing/07lcd/customcharacter_withanimation
Thanks for posting this man, it saved my life
haha. no problem. just checked out your site. pretty sweet. i like the strand competition stuff. hope you win. see you around.