Attached is a sample Squirrel class and end-to-end planner code for displaying text on the New Haven LCD display. This is a 2x16 character display that talks to the IMP vis I2C.
Note that you need pull-ups on the SCA, SDA and RESET lines of the display. This code uses pins 8,9 on the imp for I2C communications, and does NOT connect the RESET line to the IMP.
Would it be OK if we hosted this on our GitHub account (with proper attribution, etc) - we’re planning on building out some good sets of example code for various bits of hardware and web services
You rock Matt! The next part of my current project is adding an LCD, and I would have been doing a lot of head scratching without your example code. I ordered one of the New Haven LCD’s that you built the code on. What was it about this unit that made you use it? It looks pretty cool.
I’ve been trying to use this LCD and had a few issues, though I believe they are all hardware related. I had intermittent trouble with I2C communication when using 3" jumpers between an imp and the LCD. After getting my imp002’s up, I plugged that directly into the breadboard and have had no errors. (Meaning, the program returns a “0” when it initializes the LCD with I2C). I haven’t yet been able to get anything to actually show up on the however. I am using two tantalum capacitors where the datasheet indicates, and pull-up resistors on pins 1,2&3. Any thoughts or comments would be appreciated.
Jwehr, I too am trying to use i2c12 attached to an LCM1602 with an HD44780. I get backlight, power led on the LCM1602 and also get a return of 0 (once I got the right address) but still no characters on the display. You get any solutions to this?
I haven’t worked with that LCD in a while. I’m using LCds with serial backpacks at the moment for ease of use. I should take a look at the new haven LCD again, it’s probably a hardware issue.