Go Down

Topic: Changing Arduino pin definitions for Nokia 5110 (Read 723 times) previous topic - next topic

NickPyner

Dec 07, 2012, 04:28 pm Last Edit: Dec 07, 2012, 04:39 pm by NickPyner Reason: 1
I have installed the pCD8544 library for Nokia 5110 from here -   http://code.google.com/p/pcd8544/
and the working example therein is the most promising I have come across. It gives a nice display, it handles numerical data, and I have six lines of text.

The only problem is that I cannot re-arrange the pins. It uses pin 4, and I am going to need that for the on-board SD card. On all the other 5110 sketches I have used, a typical one being here -
http://blog.stuartlewis.com/2011/02/12/scrolling-text-with-an-arduino-and-nokia-5110-screen/
the pins are defined at the beginning of the sketch. I guess this one defines the pins in the library. This can't be such a good idea.   While the other 5110 sketches do not include a library for the LCD, the usual 16x2 LCD does have a library but the pins are still defined in the sketch.

Is it possible to edit the pin definitions in the library?

dhenry


NickPyner

Should? My 16x2 and my 20x4 don't.
My question was, how can I fix it? I asked because Notepad didn't want to know about it, but I now see that Word 2000 opens it OK, so I guess we are up and running. I'll check in the morning.

dhenry

Quote
My 16x2 and my 20x4 don't.


They shouldn't.

Quote
My question was, how can I fix it?


By changing the pin connection in the header file.

Go Up