Hi!
I recently got in to the "arduino-world" for a school project and started making a project I found online. It's the WiicoasterUI project.
The problem I have is that in the project he is using a serial enabled LCD display 16x2 with only three wires GND, VCC and RX.
I on the other hand have a I2C LCD 16x2 display with a backpack giving me four wires GND, VCC, SDA and SCL.
http://arduino-info.wikispaces.com/file/view/YwRobotLCD-CU-450.jpg/341645320/YwRobotLCD-CU-450.jpg
Is it possible to use the display i have on hand with the project by tweaking the code or connecting it differently. Or do I simply need to go out and buy the expensive Serial enabled display?
Thank you!
It is definitely possible to use the display that you have.
I looked at the WiiCoasterUI.pde sketch in the zip image referenced in the .pdf file you linked to.
You will have to make some changes to the sketch but they are pretty minimal.
The issue is that the serial LCD code did not implement a LCD API 1.0 or LiquidCrystal compatible API.
Because of this you will have to map their API functions to the API functions in another library.
When using i2c backpacks on hd44780 displays, it can potentially be quite a challenge to get it working with the library. This is because there are several libraries named "LiquidCrystal_I2C" and they work differently.
Compounding matters, is that not all i2c lcd backpacks are made the same way. There is no standard for how to wire up the pins from the PCF8574 chip to the LCD.
Some libraries like the LiquidCrystal_I2C in the library manager hard code the pin mappings.
While this simplifies things, it may or may not work with the backpack you have.
If you use fm's New LiquidCrystal and the LiquidCrystal_I2C class it come with, then it can work with all i2c lcd backpacks but you must give it the pin mappings. While this is not difficult, it does require some h/w knowledge of the backpack or the ability to read a schematic or the ability to follow the traces on the backpack PCB to come up with the proper pin mappings.
Alternatively, you could use my hd44780 library package that will automatically figure out the i2c address and all the pin mappings.
It is available in the IDE library manager, and you can read more about it here:
The i/o class you will use for the backpack you have is hd44780_I2Cexp
I would recommend running the included diagnostic sketch (I2CexpDiag) first to verify that everything is working properly. It will test the i2c signals and test the internal RAM on the LCD module.
After that, you can modify the sketch to use the LCD 1.0 API and LiquidCrystal API functions that nearly all other LCD libraries use, which is what hd44780 uses.
For examples, you will have to change clearScreen() to clear() and gotoPos(row, col) to setCursor(col, row)
--- bill