Giter VIP home page Giter VIP logo

adafruit_ft6206_library's Introduction

Adafruit_FT6206 Library Build StatusDocumentation

This is a library for the Adafruit FT6206-Based capacitive touch screens and displays:

Also supports FT6236 chips (and maybe other compatible chips!)

Check out the links above for our tutorials and wiring diagrams. This chip uses I2C to communicate

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Written by Limor Fried/Ladyada for Adafruit Industries. MIT license, all text above must be included in any redistribution

adafruit_ft6206_library's People

Contributors

aagan avatar driverblock avatar evaherrada avatar hoffmannjan avatar ladyada avatar siddacious avatar tdicola avatar tyeth avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

adafruit_ft6206_library's Issues

Works also with FT5206

Great work. On the Example i just get the Error, that the Touchscreen couldn't get started. But it works perfectly on the 7" Capacitive Display with Arduino Mega Shield from buydisplay

Inverted X-axis with CapTouchPaint.ino

Hi, I just bought the Adafruit 2.8" TFT Touch Shield v2 with capacitive sensor (product ID: 1947). The learn.adafruit.com page on this shield mentions the CapTouchPaint.ino example as a way of testing out the screen's touch. I found it works, however, the X-axis is inverted. For my case, this was fixed by changing

p.x = map(p.x, 0, 240, 240, 0);

to

p.x = map(p.x, 240, 0, 0, 240);

Perhaps a bug (with this specific shield)?

SDA & SCL not passed on with begin()

  • Arduino board: WT32-SCO1 with ESP32

  • Arduino IDE version (found in Arduino -> About Arduino menu): 1.8.19

LIST REPRO STEPS BELOW

If i give the SDA & SCL pins as parameters in the begin function, it does not work.
If ihard code these pins in the library Adafruit_FT6206.cpp then i works.

I use the example sketches:\

where is says

if (!ts.begin(40)) { 
    Serial.println("Unable to start touchscreen.");
  } 
  else { 
    Serial.println("Touchscreen started."); 
  }

But from the library I read that i can also use SDA,SCL and TRESHOLD so i tried

f (!ts.begin(18,19, 40)) { 
    Serial.println("Unable to start touchscreen.");
  } 
  else { 
    Serial.println("Touchscreen started."); 
  }

This, however, does not work...
This is how i solved it for the moment in Adafruit_FT6206.cpp

boolean Adafruit_FT6206::begin(uint8_t sda, uint8_t scl, uint8_t thresh) {
  if (sda == 0 && scl == 0) {
    Wire.begin();
  } else {
    Wire.begin(sda, scl);
      
      // not working with variables sda and scl, but if change with hardcoded
      // pins works -> Wire.begin(18, 19); then it works perfectly.
  }

Make private methods protected

Hello, @ladyada. I'm wondering why do you make all methods in the classes you implement private, not protected?

Doing so makes it hard to inherit from your classes's code and implement some specific behavior.

We are using some of your libraries in our project and in each library we have to deal with exactly the same issue - private methods. So we have to fork your lib, edit private-protected, inherit class to add our own logic

Compile error when I used Adafruit_FT6206 library with Adafruit_GFX

Context

  • Arduino board: UNO
  • TFT Screen ER-TFTM028-4 V4.0
  • Arduino IDE version: Arduino 1.8.9 (Windows Store 1.8.21.0)

Hi, I used with my UNO card with an TFT screen ER-TFTM028-4. The GFX work well with demo example. But when I try demo of capacitve touch screen, I've compilation error.

C:\Users\paul_\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_SPITFT.cpp: In member function 'writeFastVLine':
C:\Users\paul_\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_SPITFT.cpp:1318:1: internal compiler error: Segmentation fault

}

^

Please submit a full bug report,

with preprocessed source if appropriate.

See http://gcc.gnu.org/bugs.html for instructions.

lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status

compilation terminated.

c:/program files/windowsapps/arduinollc.arduinoide_1.8.21.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: error: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

exit status 1
Erreur de compilation pour la carte Arduino/Genuino Uno

What's the problem ??
Thank in advance for you help,

Paul.

FT6336G compatibility

Hi,

Would this library work with FT6336G? it is basically a newer version of the FR6206. Thanks!

Qualia Learn Guide mentions setting I2C address, currently not possible

https://learn.adafruit.com/adafruit-qualia-esp32-s3-for-rgb666-displays/arduino-touch-display-usage
Also https://learn.adafruit.com/adafruit-qualia-esp32-s3-for-rgb666-displays/arduino-rainbow-demo

Code example used:

#include <Wire.h>      // this is needed for FT6206
#include <Adafruit_FT6206.h>

#define I2C_TOUCH_ADDR 0x48  // often but not always 0x48!
Adafruit_FT6206 ctp = Adafruit_FT6206();  // this library also supports FT5336U!

Serial.begin(115200);  // To print the output

if (!ctp.begin(0, &Wire, I2C_TOUCH_ADDR)) {
    Serial.println("No touchscreen found");
}

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.