I want to use a 'robot LCD' color TFT on mij Arduino UNO.
I connected everything as mentioned in the example, but the only thing I get on the display is 4 thick black horizontal lines, and flashing colored lines what should be text.
Has anyone an idea what goes wrong?
Thanks.
Hoi arduinokees50, en welkom op het forum.
Your first post is very typical for a first post.
I'm not blaming you for that in any way, just pointing out that there is a better way to get answers.
You have described a product, but not by a very exact description.
Do you have a link to the LCD you are using ?
Also you are sure you connected everything correctly, but are you aware that a person tends to not see her/his own mistakes ?
So show how you connected it, perhaps by attaching a clear picture of your setup.
Next, show the code you are using to control the LCD.
There might also be some error in the example you found.
Sharing the code might help you find out about that.
Hello,
I have de same problem.
I'm using:
Robot LCD:
Arduino Leonardo:
The code is a very simple exemple from the site:
#include <TFT.h> // Hardware-specific library
#include <SPI.h>
// pin definition for the Leonardo
#define CS 2
#define DC 0
#define RESET 1
TFT myScreen = TFT(CS, DC, RESET);
// initial position of the point is the middle of the screen
// initial position of the point is the middle of the screen
int xPos = 80;
int yPos = 64;
// direction and speed
int xDir = 1;
int yDir = 1;
int outPin = 13; //VARIAVEL DO PIN DE OUTPUT.
// variables to keep track of the point's location
int xPrev = xPos;
int yPrev = yPos;
void setup(){
myScreen.begin();
myScreen.background(0,0,0); // clear the screen
}
void loop(){
// update the location of the dot
xPos = xPos + xDir;
yPos = yPos + yDir;
// check if the current location is different than the previous
if(xPos != xPrev || yPos != yPrev){
myScreen.stroke(0,0,0); // set the stroke color to black
myScreen.point(xPrev, yPrev); // color in the previous point
}
// draw a point in the current location
myScreen.stroke(255,255,255);
myScreen.point(xPos, yPos);
// if the x or x position is at the screen edges, reverse direction
if(xPos >= 160 || xPos <= 0){
xDir = xDir*-1;
}
if(yPos >= 128 || yPos <= 0){
yDir = yDir*-1;
}
// update the point's previous location
xPrev=xPos;
yPrev=yPos;
// a 33ms delay means the screen updates 30 times a second
delay(33);
}
The only thing that I've change from the original code is the pin number of "CS" from 7 to 2, because that's where I connected it.
It's not easy to send a picture of the connections because there are other things involve, but I’ve triple-check and two other people checked the connections and the LCD is well connected.
Has anyone an idea what goes wrong?
Use IDE 1.5.x version...I had the same problem with IDE 1.0.5.