Pages: [1]   Go Down
Author Topic: What's the best way to hook up my LCD  (Read 753 times)
0 Members and 1 Guest are viewing this topic.
Salem, Oregon
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I bought a Uno and a Tinkerkit LCD two days ago. Several attempts to make to display work has failed. I am very new to this microprocessor electronics stuff and am needing some guidance from the forum community. If anyone else has used one of these Tinkerkit LCD's there is some drama necessary to make to unit work properly with the UNO. Two Drivers are needed to be loaded in the UNO library and I am unsure if I followed the web sites directions properly. I can get the LCD turn on and display some information such as 9600b 16x2 blah blah when it first comes on but that it. And zi believe everytime I use the LCD I need to add commands to the sketch to make to work. I have tried loading example sketches like  Hello World and get blinking lights on the Tinkerkit but no display readout.

Folks I am two days old and I am drowning already and my feet are hardly wet!

Any suggestions or help will be greatly appreciated, Marc
Logged

I've come to save the day

Offline Offline
Sr. Member
****
Karma: 12
Posts: 380
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Welcome.

We're going to need some more info from you. Can you post your exact sketch here so we can have a look at it for you.
Logged

Do not IM me. I will not respond. Ask questions in the forum.

Salem, Oregon
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is the code I used to try to make my Tinkerkit LCD work.

Code:
[quote]
[color=#7E7E7E]/**[/color]
[color=#7E7E7E]* Simple Hello World program. To be run on an Arduino connected[/color]
[color=#7E7E7E]* to a TinkerKit LCD module via Serial.[/color]
[color=#7E7E7E]*/[/color]

#include <[color=#CC6600]Wire[/color].h>
#include <[color=#CC6600]LiquidCrystal[/color].h>
#include <TKLCD.h>

[color=#7E7E7E]//TKLCD_Serial lcd = TKLCD_Serial(); // when connecting to TKLCD over Serial[/color]
TKLCD_Local lcd = TKLCD_Local(); [color=#7E7E7E]// when programming a TKLCD module itself[/color]


[color=#CC6600]void[/color] [color=#CC6600][b]setup[/b][/color]() {
  lcd.[color=#CC6600]begin[/color]();
  
  lcd.[color=#CC6600]clear[/color]();
  
  lcd.[color=#CC6600]print[/color]([color=#006699]"Hello World!"[/color]);
}

[color=#CC6600]void[/color] [color=#CC6600][b]loop[/b][/color]() {
   [color=#7E7E7E]// nothing do be done[/color]
}

[/quote]


I put this sketch in just like this.Let me know if you can get it to work, I think also that i might not be
installing the Drivers the right way that Tinkerkit tried to instruct me the bootloader driver.
Logged

I've come to save the day

BCC AZ USA
Offline Offline
Edison Member
*
Karma: 35
Posts: 1214
It gets hot so it must be working
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To post code, copy the code and put between code tags (the # above).  The code posted has a large amount of garbage.  I am not familiar with that particular LCD so need more info.  How is your LCD connected?  Is it serial (connect to rx and tx), I2C  (connected to SDA[A4] and SCL[A5] with pullup resistors) or 4-8 wire parallel?  Does your code compile and upload?  If not please post the errors that you get.  The more info that you provide the easier and more comprehensive our assistance can be.
Logged

Salem, Oregon
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It is connected to the 5v, ground, and TX port on the UNO, On the the Tinkerkit LCD it connected to the 4 prong serial port 1 shown on there web site. Do i need to start my code wit the clear command first too.
Logged

I've come to save the day

Offline Offline
Sr. Member
****
Karma: 12
Posts: 380
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As groundfungus said, when you post code we need it without the formatting information.

Here's your code without the formatting.

By the way, I hope your code looks like this in your sketch, and not like the formatted version you posted earlier, yes?

Code:
/**
* Simple Hello World program. To be run on an Arduino connected[/color]
* to a TinkerKit LCD module via Serial.[/color]
*/

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

//TKLCD_Serial lcd = TKLCD_Serial(); // when connecting to TKLCD over Serial
TKLCD_Local lcd = TKLCD_Local(); // when programming a TKLCD module itself


void setup() {
  lcd.begin();
  
  lcd.clear();
  
  lcd.print("Hello World!");
}

void loop() {
   // nothing do be done
}
« Last Edit: October 13, 2013, 01:25:51 am by arduinodlb » Logged

Do not IM me. I will not respond. Ask questions in the forum.

BCC AZ USA
Offline Offline
Edison Member
*
Karma: 35
Posts: 1214
It gets hot so it must be working
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Clear() will clear (blank) the display and home the cursor so its a good way to start writing to the display.  In the example code I think that you should uncomment the constructor for serial and comment out the constructor for local programming.

IS:
 
Code:
//TKLCD_Serial lcd = TKLCD_Serial(); // when connecting to TKLCD over Serial
TKLCD_Local lcd = TKLCD_Local(); // when programming a TKLCD module itself

Change to:
 
Code:
TKLCD_Serial lcd = TKLCD_Serial(); // when connecting to TKLCD over Serial
//TKLCD_Local lcd = TKLCD_Local(); // when programming a TKLCD module itself
Logged

BCC AZ USA
Offline Offline
Edison Member
*
Karma: 35
Posts: 1214
It gets hot so it must be working
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have looked further into the Tinkerkit LCD and find that it is way more than just an LCD display.  As a beginner using the Uno you might be better off getting a more standard LCD as they are way easier to interface to the Uno.  The Tinkerkit LCD is like a Arduino Leonardo board and, like the Uno, will work by itself when connected to USB.  I would suggest that you save interfacing the LCD to the Uno until you understand The LCD better and concentrate on communicating with and programming the built in Leonardo processor.
Logged

Offline Offline
Sr. Member
****
Karma: 12
Posts: 380
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

As groundfungus said, you're trying to run a little here before you can crawl.

However, if you are determined to persist with the Tinkerkit, do so without the external Uno to start with. In the screenshots on their site:

http://www.tinkerkit.com/lcd/

they have either the fully independent TInkerkit LCD (with the Arduino on the back), or their own interface shield connected to the LCD. To connect a different Arduino requires quite  a bit of rework and thinking. For now, just use the LCD with the on-board Arduino. Once you get that working, you can start thinking about what you want to do next.
Logged

Do not IM me. I will not respond. Ask questions in the forum.

Salem, Oregon
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Groundfungus, I want to Thank You for the time you took to help me with my misunderstanding of serial ports. I took your advice and separated the LCD from its shield. Plugged it directly in my breadboard, wired it to the Arduino. Made the code changes as I was directed and "Wallah", its works.

I want to say the forum is a great to get help! Thanks All, Marc
Logged

I've come to save the day

BCC AZ USA
Offline Offline
Edison Member
*
Karma: 35
Posts: 1214
It gets hot so it must be working
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am glad that I could help.  Its great that you got it working and now you have  two arduinos to  play with.
Logged

Pages: [1]   Go Up
Jump to: