1.8" TFT SPI

hi,

hat das schonmal jemand mit der 1.6.0 zum laufen bekommen?
http://www.ebay.de/itm/1-8-Serial-128X160-SPI-TFT-LCD-Modul-Display-PCB-Adapter-mit-SD-Socket-Buchse-/111546151642?pt=LH_DefaultDomain_77&hash=item19f8ab32da

habe ein paar beispiel sketche gefunden, aber bei allen hagelt es fehler in den adafruit libs.

danke & grüße

UTFT versucht?

nö. is das auch nur ne option oder siehst du da echte chancen?

http://www.rinkydinkelectronics.com/library.php?id=51

Wurde aber scheinbar schon länger nicht mehr geupdatet. Sollte die Libary richtig geschrieben worden sein, sollte sie eigentlich gehen. Bei Adafruit wirst du etwas Zeit rein stecken um die zum laufen zu bringen.

werds mal testen, mal gucken was rauskommt :o

Ansonsten auch mal die Fehlerausgabe hier zur Verfügung stellen (adafruit und utft)

sketch:

// Grafiktest 1.8 Zoll TFT-Farb-Display (HY-1.8 SPI)

#define cs   10 // Arduino-Pin an Display CS   
#define dc   9  // Arduino-Pin an 
#define rst  8  // Arduino Reset-Pin

#include <Adafruit_GFX.h>    // Adafruit Grafik-Bibliothek
#include <Adafruit_ST7735.h> // Adafruit ST7735-Bibliothek
#include <SPI.h>

Adafruit_ST7735 tft = Adafruit_ST7735(cs, dc, rst);  // Display-Bibliothek Setup

void setup(void)
{

  tft.initR(INITR_BLACKTAB);   // ST7735-Chip initialisieren

}

void loop()
{

  // Bildschirm mit Farbe fuellen
  // fillScreen(farbe);
  tft.fillScreen(ST7735_BLACK);

  delay(2000); // 2 Sekunden warten

  // Fontgroesse setzen
  // setTextSize(groesse);
  tft.setTextSize(2);

  // Schrift umbrechen?
  // setTextWrap(true);   true=Ja, false=Nein
  tft.setTextWrap(true);

  // Textposition setzen
  // setCursor(x,y);
  tft.setCursor(24, 4);

  // Textfarbe setzen
  // setTextColor(farbe);
  tft.setTextColor(ST7735_WHITE);

  // Text ausgeben
  // print(text);
  tft.print("Hallo !");

  delay(2000); // 2 Sekunden warten

  // Linie zeichnen
  // drawLine(x_start,y_start,x_ende,y_ende,farbe);
  tft.drawLine(10, 24, 118, 24, ST7735_GREEN);

  delay(2000); // 2 Sekunden warten

  // Ein Rechteck zeichnen
  // drawRect(x_oben_links,y_oben_links,weite,hoehe,farbe);
  tft.drawRect(4, 35, 120, 20, ST7735_RED);

  delay(2000); // 2 Sekunden warten

  // Ein gefuelltes Rechteck zeichnen
  // drawRect(x_oben_links,y_oben_links,weite,hoehe,farbe);
  tft.fillRect(10, 40, 108, 10, ST7735_YELLOW);

  delay(2000); // 2 Sekunden warten

  // Ein Rechteck zeichnen
  // drawRoundRect(x_oben_links,y_oben_links,weite,hoehe,rundung,farbe);
  tft.drawRoundRect(4, 65, 120, 20, 5, ST7735_MAGENTA);

  delay(2000);

  // Einen Kreis zeichnen
  // drawCircle(x_oben_links,y_oben_links,radius,farbe);
  tft.drawCircle(64, 115, 20, ST7735_CYAN);

  delay(2000); // 2 Sekunden warten

  // Einen gefuellten Kreis zeichnen
  // fillCircle(x_oben_links,y_oben_links,radius,farbe);
  tft.fillCircle(64, 115, 10, ST7735_BLUE);

  delay(2000); // 2 Sekunden warten

  // Neue Fontgroesse setzen
  // setTextSize(groesse);
  tft.setTextSize(1);

  // Neue Textfarbe setzen
  // setTextColor(farbe);
  tft.setTextColor(ST7735_GREEN);

  // Neue Textposition setzen
  // setCursor(x,y);
  tft.setCursor(14, 147);

  // Text ausgeben
  // print(text);
  tft.print("blog.simtronyx.de");

  delay(8000); // 8 Sekunden warten

  // Gesamtes Display invertieren?
  // invertDisplay(true);   true=Ja, false=Nein
  tft.invertDisplay(true);

  delay(1000); // 1 Sekunde warten

  // Gesamtes Display invertieren?
  // invertDisplay(false);   true=Ja, false=Nein
  tft.invertDisplay(false);

  delay(1000); // 1 Sekunde warten
}

fehler beim kompilieren:

Build-Optionen wurden verändert, alles wird neu gebaut
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp: In constructor 'Adafruit_ST7735::Adafruit_ST7735(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t)':
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:33:27: error: no matching function for call to 'Adafruit_GFX::Adafruit_GFX()'
  uint8_t sclk, uint8_t rst) {
                           ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:33:27: note: candidates are:
In file included from C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.h:28:0,
                 from C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:19:
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit-GFX-Library-master/Adafruit_GFX.h:17:3: note: Adafruit_GFX::Adafruit_GFX(int16_t, int16_t)
   Adafruit_GFX(int16_t w, int16_t h); // Constructor
   ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit-GFX-Library-master/Adafruit_GFX.h:17:3: note:   candidate expects 2 arguments, 0 provided
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit-GFX-Library-master/Adafruit_GFX.h:13:7: note: Adafruit_GFX::Adafruit_GFX(const Adafruit_GFX&)
 class Adafruit_GFX : public Print {
       ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit-GFX-Library-master/Adafruit_GFX.h:13:7: note:   candidate expects 1 argument, 0 provided
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp: In constructor 'Adafruit_ST7735::Adafruit_ST7735(uint8_t, uint8_t, uint8_t)':
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:45:69: error: no matching function for call to 'Adafruit_GFX::Adafruit_GFX()'
 Adafruit_ST7735::Adafruit_ST7735(uint8_t cs, uint8_t rs, uint8_t rst) {
                                                                     ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:45:69: note: candidates are:
In file included from C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.h:28:0,
                 from C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:19:
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit-GFX-Library-master/Adafruit_GFX.h:17:3: note: Adafruit_GFX::Adafruit_GFX(int16_t, int16_t)
   Adafruit_GFX(int16_t w, int16_t h); // Constructor
   ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit-GFX-Library-master/Adafruit_GFX.h:17:3: note:   candidate expects 2 arguments, 0 provided
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit-GFX-Library-master/Adafruit_GFX.h:13:7: note: Adafruit_GFX::Adafruit_GFX(const Adafruit_GFX&)
 class Adafruit_GFX : public Print {
       ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit-GFX-Library-master/Adafruit_GFX.h:13:7: note:   candidate expects 1 argument, 0 provided
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp: At global scope:
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:101:16: error: 'prog_uchar' does not name a type
 PROGMEM static prog_uchar
                ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:159:12: error: expected unqualified-id before ',' token
       255 },                  //     255 = 500 ms delay
            ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:161:11: error: expected constructor, destructor, or type conversion before '=' token
   Rcmd1[] = {                 // Init for 7735R, part 1 (red or green tab)
           ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:196:13: error: expected unqualified-id before ',' token
       0x05 },                 //     16-bit color
             ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:198:16: error: expected constructor, destructor, or type conversion before '=' token
   Rcmd2green[] = {            // Init for 7735R, part 2 (green tab only)
                ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:205:24: error: expected unqualified-id before ',' token
       0x00, 0x9F+0x01 },      //     XEND = 159
                        ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:206:14: error: expected constructor, destructor, or type conversion before '=' token
   Rcmd2red[] = {              // Init for 7735R, part 2 (red tab only)
              ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:213:19: error: expected unqualified-id before ',' token
       0x00, 0x9F },           //     XEND = 159
                   ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:215:11: error: expected constructor, destructor, or type conversion before '=' token
   Rcmd3[] = {                 // Init for 7735R, part 3 (red or green tab)
           ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp: In member function 'void Adafruit_ST7735::commonInit(uint8_t*)':
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:262:48: error: 'constructor' was not declared in this scope
   constructor(ST7735_TFTWIDTH, ST7735_TFTHEIGHT);
                                                ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp: In member function 'void Adafruit_ST7735::initB()':
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:306:14: error: 'Bcmd' was not declared in this scope
   commonInit(Bcmd);
              ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp: In member function 'void Adafruit_ST7735::initR(uint8_t)':
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:312:14: error: 'Rcmd1' was not declared in this scope
   commonInit(Rcmd1);
              ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:314:17: error: 'Rcmd2green' was not declared in this scope
     commandList(Rcmd2green);
                 ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:319:17: error: 'Rcmd2red' was not declared in this scope
     commandList(Rcmd2red);
                 ^
C:\Users\%USERNAME%\Documents\Arduino\libraries\Adafruit_ST7735\Adafruit_ST7735.cpp:321:15: error: 'Rcmd3' was not declared in this scope
   commandList(Rcmd3);
               ^
Fehler beim Kompilieren.

so oder so ähnlich sieht es bei anderen sketchbeispielen aus dem netz auch aus.

UTFT noch nicht getestet.