GithubHelp home page GithubHelp logo

Comments (3)

ruffle-b avatar ruffle-b commented on August 11, 2024

Oh dear.... it gets worse :-(

If you uncomment the test_sd_card() function in the demo and call it just before tft_demo:

test_sd_card(); tft_demo();

it a) seems to corrupt the SDCard and b) the demo doesn't display anything else on the TFT after the "SPIFFS Mounted" message.

My ESP32 (Lolin D32 Pro) has the inbuilt SDCard and TFT with different CS pins on the same SPI bus.

Does this mean this library won't work with an SDCard on the same bus?

PS - I noticed 80000000 hard coded in spi_master_lobo.c and thought I might be on to something (I run my ESPS32 at 240MHz). Sadly changing the frequency of my ESP32 to 80MHz doesn't fix this problem.

from esp32_tft_library.

sukeshak avatar sukeshak commented on August 11, 2024

Yes this library has an issue where display and SD Card doesn't work together. I had to abandon this library for the same reason.

@loboris is aware of the issue but I guess busy to fix it ☹

from esp32_tft_library.

nospam2000 avatar nospam2000 commented on August 11, 2024

The offset needs to be changed for this display to x=2, y=3.

The hardware works with the Adafruit ST7735 Library in the Arduino IDE using
tft.initR(INITR_144GREENTAB)

That one also had a slightly wrong offset for my display. You can use the original Adafruit Adafruit_ST7735 library and this derived class to fix it:

#include <Adafruit_GFX.h>    // Core graphics library
#include <Adafruit_ST7735.h> // Hardware-specific library for ST7735
#include <SPI.h>

class WEMOS_TFT_144_V100 : public Adafruit_ST7735 {
  public:
    WEMOS_TFT_144_V100(int8_t _CS, int8_t _DC, int8_t _MOSI, int8_t _SCLK, int8_t _RST = -1, int8_t _MISO = -1) :
      //Adafruit_ST7735(_CS, _DC, _MOSI, _SCLK, _RST, _MISO) // _MISO is missing in this constructor, although it exists in the superclass
      Adafruit_ST7735(_CS, _DC, _MOSI, _SCLK, _RST)
    {
    }
    WEMOS_TFT_144_V100(int8_t CS, int8_t RS, int8_t RST = -1) :
      Adafruit_ST7735(CS, RS, RST)
    {
    }
    WEMOS_TFT_144_V100(SPIClass *spiClass, int8_t CS, int8_t RS, int8_t RST = -1) :
      Adafruit_ST7735(spiClass, CS, RS, RST)
    {
    }

    void initR(uint8_t /* options */, int8_t colstart = 2, int8_t rowstart = 3)
    {
      Adafruit_ST7735::initR(INITR_144GREENTAB);
      _colstart = colstart;
      _rowstart = rowstart;
      setRotation(0); // to set _xstart and _ystart
    }
};

create the tft instance like this:
WEMOS_TFT_144_V100 tft = WEMOS_TFT_144_V100(TFT_CS, TFT_DC, TFT_RST);

and call tft.initR() like before:
tft.initR(INITR_144GREENTAB);
actually the parameter INITR_144GREENTAB is ignored, it is hardcoded in the new class.

from esp32_tft_library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.