Tinkerkit LCD

Hi,
We bought a DCcduino MEGA 2560 card, a tinkerkit MEGA Shield and a tinkerkit LCD.
We tested the card with the blink program and it ran but we have a problem on how to use the Tinkerkit LCD.
We imported the library TKLCD but we cannot print something, we used this program:

#include <Wire.h>
#include <LiquidCrystal.h>
#include <TKLCD.h>

TKLCD_Serial lcd = TKLCD_Serial(1);

void setup() {
lcd.begin();

lcd.clear();

lcd.print("Hello World!");
}

void loop() {

}

But nothing happened.
Did we need to do something else that we still didn't do ? Else how we solve this problem ?

Thanks.

Are you satisfied the sketch compiled and uploaded? You got the "done uploading" message?

It's always a good idea to put a message to the monitor in the code so you can see it actually runs.

Put these lines marked <<<<<<<<<<<<< below and then open the monitor and you should see the message. (Monitor is control+shift+M in the ide)

#include <Wire.h>
#include <LiquidCrystal.h>
#include <TKLCD.h>

TKLCD_Serial lcd = TKLCD_Serial(1);


void setup() {

  Serial.begin(9600);  //<<<<<<<<<<<<<<<<<<<<<<<<
  Serial.println("code is running.....");  //<<<<<<<<<<<<<<<<<<
 
  lcd.begin();
  
  lcd.clear();
  
  lcd.print("Hello World!");
}

void loop() {

}

We have the done uploading message and when we open the monitor the message
"±‹•is running.....
þXHello World!" appear.
But nothing was printed on the LCD.

"±‹•is running.....
þXHello World!"

??

Presumably that's what you put in your Serial.print()?

We put just what you said us to put !
"Hello world" is in the function lcd.print and "code is running....." in serial.printIn.

Some signs appear and there are more and more signs coming and we don't know why, just look at the pictures.

Well "Hello world" shouldn't be in the monitor.

Post your current code.

Our current code:

#include <Wire.h>
#include <LiquidCrystal.h>
#include <TKLCD.h>

TKLCD_Serial lcd = TKLCD_Serial(1);

void setup() {

Serial.begin(9600); //<<<<<<<<<<<<<<<<<<<<<<<<
Serial.println("code is running....."); //<<<<<<<<<<<<<<<<<<

lcd.begin();

lcd.clear();

lcd.print("Hello World!");
}

void loop() {

}

I'm confused a bit: does it display "Hello world" in the monitor, even though you have that in an lcd.print()? If so that's really weird....

Yes !

That's probably because they use the same serial port.

The Mega has many ports, so change the ones I added to Serial2.xxxx

Sorry I hadn't noticed it was a mega.

That should get the monitor prints working correctly I guess.

I wonder if the lcd thing is a serial setting problem, stop bits and stuff. See here.

Actually it's easier to change your lcd to a different serial port and change its number

But other than checking the serial parameters for your lcd, I'm out of ideas. You can remove the lines I said to add in fact, since we know the sketch is actually running.

We changed the port on the megashield, now it's actually hook up on serial2. And it appear "code is running..." on the LCD ! ;D
Do lcd.begin ; lcd.print() are useful ?

#include <Wire.h>
#include <LiquidCrystal.h>
#include <TKLCD.h>

TKLCD_Serial lcd = TKLCD_Serial(2);

void setup() {

Serial2.begin(9600); //<<<<<<<<<<<<<<<<<<<<<<<<
Serial2.println("code is running....."); //<<<<<<<<<<<<<<<<<<

lcd.begin();

lcd.clear();

lcd.print("Hello World!");
}

void loop() {

}

I guess it's all a matter of what's om what port, but I would expect the tk library to provide more functionality than the simple serial print: like blinking, special characters and so on, so yeah i'm sure the lcd.xxxx are useful if you can figure it out.

I've never used a mega or a tk, so I'm really guessing.

For exemple don't you know how to clear LCD screen ? or control each line ?

Even if you don't know, thank you very much for your precious help !