LCD Display success

November 24, 2012 at 3:19 am Leave a comment

A few weeks ago I bought a LCD Display module from Adafruit. The selling point (for me) was that it has several buttons for navigating options on a headless Pi and an LCD character display to let me know whats going on. Especially for the time-lapse project I’m working on now, where I don’t want to VNC into the Pi to set up the session, this seemed like an ideal solution. As an added bonus, it only uses 2 pins on the GPIO connector, which are already dedicated for I2C communication. What’s not to love?

It actually turned out to be a bit more work than that (it always does, right?) because the module I bought was for the Arduino, which apparently likes to talk over I2C with a 5V pull up… while the Raspberry Pi prefers 3.3V, thank you very much. Adafruit basically states on the product page that it’s only designed for the Arduino, and the Pi is not supported. Fair enough. I should have been paying closer attention.

Except it turned out to be a learning opportunity. You see, the chip they use on the LCD shield (MCP23017) has its own tutorial on the Adafruit site… for extending the number of GPIO pins on the Pi! So I figured, if I can wire up the LCD shield in a similar way, I should at least be able to talk to the MCP23017, and from there I can code the commands to run the LCD character display. 

It turns out that it was pretty simple… just remove R1 and R2 resistors from the LCD shield and the 5V pull up goes away, and the Pi talks just fine to the I2C chip. As an added bonus, Adafruit introduced an LCD shield this past week with a stackable header that is essentially the previous shield with the resistors pulled out. Using the python code they wrote for the new product is totally compatible with my kit, so I was able to get the shield displaying text pretty easily (after I figured out the reason no text was showing up was due to the contrast potentiometer being turned all the way down).

Next step is to fold this into the time-lapse code and make it useful for setting up the pictures. Then I need to sort out how to power this contraption out in the field and I’ll be able to build a board to replace the spagetti of wires I have now!

Advertisements

Entry filed under: Uncategorized.

Tech Valley Makers Meeting – Nov 28th @ 7pm LCD Character Display technical details

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Flickr Photos


%d bloggers like this: