Code Monkey home page Code Monkey logo

tft_etouch's Introduction

TFT_eTouch

generic touch support for resistive chips

unzip the Doxygen docu in docs for additional documentation

tft_etouch's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tft_etouch's Issues

Virtual SPI not working

#include <SPI.h>

#include <TFT_eSPI.h>       
#include <TFT_eTouch.h>      


// Its difficult to have two spi at the same time, i have to create virtual spi for touchscreen
// SPI of the LCD and the XPT2046 are not in the same bus
// ESP32-2432S028
// LCD is working fine

TFT_eSPI tft = TFT_eSPI();  // Invoke custom library

auto vspi = new SPIClass(VSPI);
TFT_eTouch<TFT_eSPI> touch(tft, 33, 36, *vspi);

void setup() {
  Serial.begin( 115200 );

  
  vspi->begin(25, 39, 32, 33);
  vspi->setFrequency( 60000000 );

  pinMode(vspi->pinSS(), OUTPUT);

  tft.init();
  touch.init();  
  
``
  //RIGHT COLORS
  tft.writecommand(TFT_MADCTL);
  tft.writedata(0x40);

  tft.fillScreen(TFT_BLACK);
  tft.drawRect(0, 0, tft.width(), tft.height(), TFT_GREEN);

  Serial.println("Config ended");
}

void loop() {

  int16_t x = 0;
  int16_t y = 0;
  // Never entry here 
  if (touch.getXY(x, y)) {
    Serial.print(x);
    Serial.print("   ");
    Serial.println(y);
  }
}

I have tried to create a VSPI bus but only screen is working.

Apparent error in TFT_eTouchUser.h

TFT_eTouchUser.h : Lines 68-70

ifdef TOUCH_CS // was ifdef - obviously error

#error undef TOUCH_CS in TFT_eSPI UserSetup.h for using TFT_eTouch

endif

ifdef should be ifndef

ISR not in IRAM! User exception (panic/abort/assert) Abort called

Platform:ESP8266 RAW.ino

on TFT_eSPI can work fine but use this lib can not work

if used IRQ PIN 10 ,ESP8266 reboot repeat

not use IRQ no response

ISR not in IRAM!

User exception (panic/abort/assert)
Abort called

stack>>>

ctx: cont
sp: 3ffffee0 end: 3fffffc0 offset: 0000
3ffffee0: ffffffff 3fffc6fc 00000578 00000578
3ffffef0: 000000fe 00000000 00000000 00000000
3fffff00: 00000000 00000000 00000000 00ff0000
3fffff10: 5ffffe00 5ffffe00 40209968 00000000
3fffff20: 00000002 0000000a 3ffee970 402090de
3fffff30: 4010046e 00000fa0 00000078 402090f0
3fffff40: 40100268 3ffee9b4 3ffee970 40209606
3fffff50: 00000000 3ffefa3c 3ffefa34 4020a33d
3fffff60: 00000000 3ffeec9c 3ffeec9c 000000ff
3fffff70: 3ffeeab8 3ffee9b4 3ffee970 402096b8
3fffff80: 3ffeeab8 3ffee9b4 3ffee970 40205371
3fffff90: feefeffe feefeffe feefeffe 3ffeeb20
3fffffa0: 3fffdad0 00000000 3ffeeae0 40208d40
3fffffb0: feefeffe feefeffe 3ffe84e0 40100dcd
<<<stack<<<

ets Jan 8 2013,rst cause:2, boot mode:(3,6)

X and Y directions are inversed, how to fix

Using the calibrate.ino program, when I move up in the Y direction the cursor moves down.
And when I move horizontally left, the cursor moves right. Both are opposite.

I have not figured out how to change this in either the ino program or the library.
Based on the comments, I think it should be easy, but I just can't figure it out.

Can you point me to what needs to be changed?

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.