Herkese merhaba
Ben arduino uno ile 1.77 inch tft lcd shield'i arduino'nun ide sindeki örnek yazılım ile sürmeyi deniyorum. Ancak bağlantılar doğru olmasına karşın fotoğraftaki gibi bir görüntü hatası elde ediyorum .Acaba bunun sebebi ne olabilir?
(http://s29.postimg.cc/t6n6t5s7n/IMG_0018.jpg) (http://postimg.cc/image/t6n6t5s7n/)
örnek kod
/*
Arduino TFT text example
This example demonstrates how to draw text on the
TFT with an Arduino. The Arduino reads the value
of an analog sensor attached to pin A0, and writes
the value to the LCD screen, updating every
quarter second.
This example code is in the public domain
Created 15 April 2013 by Scott Fitzgerald
http://arduino.cc/en/Tutorial/TFTDisplayText (http://arduino.cc/en/Tutorial/TFTDisplayText)
*/
#include <TFT.h> // Arduino LCD library
#include <SPI.h>
// pin definition for the Uno
#define cs 10
#define dc 9
#define rst 8
// pin definition for the Leonardo
// #define cs 7
// #define dc 0
// #define rst 1
// create an instance of the library
TFT TFTscreen = TFT(cs, dc, rst);
// char array to print to the screen
char sensorPrintout[4];
void setup() {
// Put this line at the beginning of every sketch that uses the GLCD:
TFTscreen.begin();
// clear the screen with a black background
TFTscreen.background(0, 0, 0);
// write the static text to the screen
// set the font color to white
TFTscreen.stroke(255,255,255);
// set the font size
TFTscreen.setTextSize(2);
// write the text to the top left corner of the screen
TFTscreen.text("Sensor Value :\n ",0,0);
// ste the font size very large for the loop
TFTscreen.setTextSize(5);
}
void loop() {
// Read the value of the sensor on A0
String sensorVal = String(analogRead(A0));
// convert the reading to a char array
sensorVal.toCharArray(sensorPrintout, 4);
// set the font color
TFTscreen.stroke(255,255,255);
// print the sensor value
TFTscreen.text(sensorPrintout, 0, 20);
// wait for a moment
delay(250);
// erase the text you just wrote
TFTscreen.stroke(0,0,0);
TFTscreen.text(sensorPrintout, 0, 20);
}
EKranın SPI bacakların arduino üzerindeki 11 ve 13'e bağlandın değil mi?
(Connect the BL and +5V pins to power,
GND to ground
Connect CS-LD to pin 10
DC to pin 9, RESET to pin 8
MOSI to pin 11
SCK to pin 13
diğer bağlantıları doğru bağladım diyorsan, beslemen 5V'da ise başka bir program ve kütüphaneler ile dene.
http://arduino.cc/en/uploads/Tutorial/GTFT_text_large.png (http://arduino.cc/en/uploads/Tutorial/GTFT_text_large.png)
bağlatılarını yaptığından emin ol.
http://arduino.cc/en/uploads/Guide/GLCD_pinUse.png (http://arduino.cc/en/uploads/Guide/GLCD_pinUse.png)
ekran bacak bağlantıların.
Sorun çözüldü
1.5.8 Arduino İDE sini yükledim ve sonra bu İDE ile yazılımı yeniden yükledim. TFT lcd çalıştı. Böylece sorun çözülmüş oldu.