Hallo zusammen. Ich habe eine TFT Touch Display gekauft (als Set siehe link unten). Leider finde ich keine Library die funktioniert. Bekomme immer nur ein weisses Display.
Vor habe ich das ein paar Buttons darauf abgebildet werden, welche dann verschiedene IR Befehle auslösen bzw. auch eine paar Schaltungen gestartet werden.
Hat jemand vieleicht eine Library die funkioniert?
Verbaut sollte eine SSD1289 Controller sein
Hier noch der Link vom Bauteil
Wenn ich dieses Beispiel probiere geht es leider auch nicht:
// UTFT_Buttons_Demo_320x240
// Copyright (C)2016 Rinky-Dink Electronics, Henning Karlsen. All right reserved
// web: http://www.RinkyDinkElectronics.com/
//
// A small demo to demonstrate the use of some of the
// functions of the UTFT_Buttons add-on library.
//
// This demo was made for modules with a screen resolution
// of 320x240 pixels, but should work on larger screens as
// well.
//
// This program requires both the UTFT and URTouch libraries
// in addition to the UTFT_Buttons add-on library.
//
#include <UTFT.h>
#include <URTouch.h>
#include <UTFT_Buttons.h>
// Declare which fonts we will be using
extern uint8_t SmallFont[];
extern uint8_t BigFont[];
extern uint8_t Dingbats1_XL[];
// Set up UTFT...
// Set the pins to the correct ones for your development board
// -----------------------------------------------------------
// Standard Arduino 2009/Uno/Leonardo shield : <display model>,19,18,17,16
// Standard Arduino Mega/Due shield : <display model>,38,39,40,41
// CTE TFT LCD/SD Shield for Arduino Due : <display model>,25,26,27,28
// Standard chipKit Uno32/uC32 : <display model>,34,35,36,37
// Standard chipKit Max32 : <display model>,82,83,84,85
// AquaLEDSource All in One Super Screw Shield : <display model>,82,83,84,85
// CC3200 LaunchPad (pins used in the examples): <display model>,15,18,11,32
//
// Remember to change the model parameter to suit your display module!
UTFT myGLCD(SSD1289,38,39,40,41);
// Set up URTouch...
// Set the pins to the correct ones for your development board
// -----------------------------------------------------------
// Standard Arduino 2009/Uno/Leonardo shield : 15,10,14,9,8
// Standard Arduino Mega/Due shield : 6,5,4,3,2
// CTE TFT LCD/SD Shield for Arduino Due : 6,5,4,3,2
// Standard chipKit Uno32/uC32 : 20,21,22,23,24
// Standard chipKit Max32 : 62,63,64,65,66
// AquaLEDSource All in One Super Screw Shield : 62,63,64,65,66
// CC3200 LaunchPad (pins used in the examples): 31,13,19,28,17
//
URTouch myTouch(6,5,4,3,2);
// Finally we set up UTFT_Buttons :)
UTFT_Buttons myButtons(&myGLCD, &myTouch);
void setup()
{
myGLCD.InitLCD();
myGLCD.clrScr();
myGLCD.setFont(SmallFont);
myTouch.InitTouch();
myTouch.setPrecision(PREC_MEDIUM);
myButtons.setTextFont(BigFont);
myButtons.setSymbolFont(Dingbats1_XL);
}
void loop()
{
int but1, but2, but3, but4, butX, butY, pressed_button;
boolean default_colors = true;
but1 = myButtons.addButton( 10, 20, 300, 30, "Button 1");
but2 = myButtons.addButton( 10, 60, 300, 30, "Button 2");
but3 = myButtons.addButton( 10, 100, 300, 30, "Button 3");
but4 = myButtons.addButton( 10, 140, 300, 30, "Button 4", BUTTON_DISABLED);
butX = myButtons.addButton(279, 199, 40, 40, "a", BUTTON_SYMBOL);
butY = myButtons.addButton( 0, 199, 100, 40, "I", BUTTON_SYMBOL | BUTTON_SYMBOL_REP_3X);
myButtons.drawButtons();
myGLCD.print("You pressed:", 110, 205);
myGLCD.setColor(VGA_BLACK);
myGLCD.setBackColor(VGA_WHITE);
myGLCD.print("None ", 110, 220);
while(1)
{
if (myTouch.dataAvailable() == true)
{
pressed_button = myButtons.checkButtons();
if (pressed_button==butX)
{
if (myButtons.buttonEnabled(but4))
myButtons.disableButton(but4, true);
else
myButtons.enableButton(but4, true);
}
else if (pressed_button==butY)
{
if (default_colors)
{
myButtons.setButtonColors(VGA_YELLOW, VGA_RED, VGA_YELLOW, VGA_BLUE, VGA_GRAY);
myButtons.relabelButton(butY, "_");
myButtons.drawButtons();
default_colors=false;
}
else
{
myButtons.setButtonColors(VGA_WHITE, VGA_GRAY, VGA_WHITE, VGA_RED, VGA_BLUE);
myButtons.relabelButton(butY, "I");
myButtons.drawButtons();
default_colors=true;
}
}
if (pressed_button==but1)
myGLCD.print("Button 1", 110, 220);
if (pressed_button==but2)
myGLCD.print("Button 2", 110, 220);
if (pressed_button==but3)
myGLCD.print("Button 3", 110, 220);
if (pressed_button==but4)
myGLCD.print("Button 4", 110, 220);
if (pressed_button==-1)
myGLCD.print("None ", 110, 220);
}
}
}