Nokia 6100 LCD Display - Arduino Playground

Well turns out it was my wiring is why my screen wasn't working! I have the LCD with the Epson driver, and has a voltage booster on board so no need for the external power supply! I got it connected and was able to type whatever I want, with the like 12 colors the code had. Now my problem is.. I don't understand all of the code, was hoping there was a library out, I found one, but for some reason it's not working with the Arduino IDE I have. http://blog.lukrop.bplaced.net/archives/Nokia-6610-LCD-+-Arduino.html

But the one that does work, doesn't have any libraries, and I just don't have the experience under my belt to make a library yet :P http://gravitech.us/MicroResearch/Others/LCD6100/LCD6610_Arduino.pde

This one isn't Arduino code (http://blog.lukrop.bplaced.net/archives/Nokia-6610-LCD-+-Arduino.html) It's C code which can be compiled with WinAVR for example!

I will take a look on the other.

Arduino Code = C Code

Haha, I'm so very confused now!

So, that was or wasn't Arduino code?

The only real issue I've had so far, is getting a good library. I've gone over the library writing tutorial a few times, and it seems pretty easy. Until I take a look at longer code that I'm trying to break down into a library, I get overwhelmed. The second link I posted earlier, the code works, but it's more just sample code, no real useful commands. And I wasn't able to set a background color. Maybe it's just my in-experience.

Arduino Code is C code - Yes. But the code you found that can't be compiled with the Arduino compiler is real C code - Arduino Code is an easier version of C (you don't need to include a lot of extra ATMEGA compiling related things) When you click Compile in Arduino, your Arduino code is compiled to real C code, and then afterwards compiled to a HEX!

Oh.. haha, smooth.. go me :) So, if that's the case, what about the zip files on the site? Those aren't Arduino compatible either?

I haven't actually tried the code it self so had no idea, but only because I haven't gotten the "libraries" to work. Or what I think/thought are libraries.

I’m not sure if the Libraries is Arduino compatible, but I don’t think!
But I’m sure that the code snippet can’t be used, as this line “#include <WProgram.h>” is allways added before HEX compiling, as that’s the ATMEGA HEX Compiling Settings.

Well, from the pictures and what the guy says, it's all based on the Arduino setup. He said the library was written for the Arduino platform, not 100% sure if that's the same as the Arduino IDE (Assuming they're different) I could have it all mixed up and be completely wrong, cause I don't have any technical idea of what's going on. I just read and hope it's right, lol :) Thanks for taking the time to help me try understand :D Much appreciated. Here's the setup the guy used with his LCD, using those Arduino files, but it was quite a while ago, so I'm not sure how the updated IDE would affect it.

The Arduino is programmed in bog standard C, no different than any other C. It is based around the AVR-GCC libraries. What it does have is abstractions for the more 'advanced' stuff, i.e. port access, etc. and all they are is libraries sitting on top of C to make things easier for the user. Apart from that, any standard C program will work. If the C is for a different microcontroller you would obviously need to port it over to the hardware you are using, i.e. The Arduino.

Oh, thanks for that information Mike Mc. It's good to know another time ;)

So the library CaptainObvious has found can be used with Arduino IDE? Then why can't it be compiled?

Indeed, thanks alot Mike, makes alot more sense now.

I’m with Thomas on this one, confused why it won’t work, but I have a few theories. I’m assuming because it’s old code and just needs to be updated, but I’m optimistic.

It should compile fine. Has he installed those external libraries first?

CaptainObvious - Yeah, I think soo too.. The Arduino IDE has changed alot the past, so that could be the problem why it can't be compiled! But who is willing to recode the library for use with the newer Arduino IDE?

Thomas, you took the words right out of my mouth! Haha, I've been trying to spend some extra time, creating and breaking down some libraries to try get a feel for em. But with as new as I am to code, it's just more confusing than anything. And I'm wondering if it would be better to start with pre-exsisting library codes, or use the new sketch that actually works to start a new library. Regardless! I won't stop till I find an easier way to use my LCD! :D

And with the sketch I'm using right now, I have no idea what so ever how to use input values and print them on the screen :/

The sketch you are using, which works, is pretty easy to convert to a library. I will give it a try :)

@Mike Mc: Installed external libraries? Not really sure :-? I just downloaded the zip file and extracted it to arduino0016/hardware/libraries in a folder, then get all the errors.

@Thomas J: Muchos gracias! I've been trying, based on some of the tutorials for building the libraries but I think I just need more understanding of code ::)

I just ordered my 2nd Arduino, and another 328 upgrade chip, along with some 433mhz RF kits, oo lala! :D

Library is finished - and it can compile without problems. I can't test it though, as I haven't connected my LCD yet, and I don't want to right now!

I will upload the code to my homepage (elec.tkjweb.dk/blog) in a moment...

I thought it would compile fine, but it didn't - my bad :-X It's made to a correctly library, but you get theese errors when you start Arduino - and I can't solve it myself...

NokiaLCD.cpp:195: error: no 'void NokiaLCD::shiftBits(byte)' member function declared in class 'NokiaLCD'
NokiaLCD.cpp: In member function 'void NokiaLCD::sendData(byte)':
NokiaLCD.cpp:259: error: 'shiftBits' was not declared in this scope
NokiaLCD.cpp: In member function 'void NokiaLCD::sendCMD(byte)':
NokiaLCD.cpp:275: error: 'shiftBits' was not declared in this scope

You can download the library (with example) here: http://elec.tkjweb.dk/blog/wp-content/uploads/NokiaLCD.zip

Omg, haha, you sir.. are amazing! I looked in the NokiaLCD.h file, and turns out you missed your F in Shift bits on one of the defines.. put in the F and it compiled fine!

Now to start experimenting, thanks again, very much!! I may be asking later how to add commands to the library. :D but for now, need to try!

You're right - I've missed that :P So, is it working?

I've re-uploaded the working library (with example) here: http://elec.tkjweb.dk/blog/wp-content/uploads/NokiaLCD.zip