So das ist der Code mit dem das TFT geht , Pinning ist anders getestet und geht.
#include <UTFT.h>
#include <UTouch.h>
#include <UTFT_Buttons.h>
UTFT myGLCD(ITDB32S,25,26,27,28);
UTouch myTouch(6,5,32,3,2);
UTFT_Buttons myButtons(&myGLCD, &myTouch);
extern uint8_t SmallFont[];
extern uint8_t BigFont[];
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(115200);
while (!Serial) {
;
}
Serial.println("Initialising LCD.");
myGLCD.InitLCD();
myGLCD.clrScr();
myGLCD.setFont(SmallFont);
myTouch.InitTouch();
myTouch.setPrecision(PREC_MEDIUM);
myButtons.setTextFont(BigFont);
int butskip=myButtons.addButton( 85, 219 ,70, 20, "Skip");
Serial.println("LCD initialised.");
myButtons.drawButton(butskip);
Serial.println("Waiting for Skip button.");
int skip=2;
while(skip==2) {
if(myButtons.checkButtons()==butskip)
{
Serial.println("Skip button detected");
skip=true;
}
}
}
void loop()
{
}
[/code]
und dann noch in der Lib // libraries\UTFT\hardware\arm hardware _defines.h
// CTE TFT LCD/SD Shield for Arduino Due
// -------------------------------------
// Uncomment the following line if you are using this shield
#define CTE_DUE_SHIELD 1 //// das hier auskommentiert ////
//
// For this shield: RS=25, WR=26, CS=27, RST=28
//********************************************************************
// ElecHouse TFT LCD/SD Shield for Arduino Due
// -------------------------------------
// Uncomment the following line if you are using this shield
//#define EHOUSE_DUE_SHIELD 1
//
// For this shield: RS=22, WR=23, CS=31, RST=33
//********************************************************************
// *** Hardwarespecific defines ***
#define cbi(reg, bitmask) *reg &= ~bitmask
#define sbi(reg, bitmask) *reg |= bitmask
#define pulse_high(reg, bitmask) sbi(reg, bitmask); cbi(reg, bitmask);
#define pulse_low(reg, bitmask) cbi(reg, bitmask); sbi(reg, bitmask);
#define cport(port, data) port &= data
#define sport(port, data) port |= data
#define swap(type, i, j) {type t = i; i = j; j = t;}
#define fontbyte(x) cfont.font[x]
#define pgm_read_word(data) *data
#define pgm_read_byte(data) *data
#define bitmapdatatype unsigned short*
#if defined(TEENSYDUINO) && TEENSYDUINO >= 117
#define regtype volatile uint8_t
#define regsize uint8_t
#else
#define regtype volatile uint32_t
#define regsize uint32_t
#endif
kannst das ja mal ausprobieren evl gehts dan ja
mfg ADDI