Pages: [1]   Go Down
Author Topic: Changing Arduino pin definitions for Nokia 5110  (Read 652 times)
0 Members and 1 Guest are viewing this topic.
Dee Why NSW
Offline Offline
Full Member
***
Karma: 5
Posts: 206
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: December 07, 2012, 10:39:49 am by NickPyner » Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

All defined in the .h file: as it should.
Logged

Dee Why NSW
Offline Offline
Full Member
***
Karma: 5
Posts: 206
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: