sumotoy / RA8875

A library for RAiO RA8875 display driver for Teensy3.x or LC/Arduino's/Energia/Spark
GNU General Public License v3.0
79 stars 55 forks source link

FT5206_touchScreen (and same more examples) not working with Arduino Mega 2560 #71

Closed ivanbarquero closed 8 years ago

ivanbarquero commented 8 years ago

Hi, Sorry for my bad English :( . And thanks for your work!!

I will try to explain my issue the best i can. I can run this example "FT5206_touchScreen", I think that is because you are using interrupts "tft.enableCapISR(true);" and in "RA8875.h" you write " Arduino cannot use any pin for interrupts! In my examples I don't use interrupts but just reading pin state so you can use any pin"

I can upload the Sketch to my board, but it doesnt works..

Some more issues:

pingpong.ino

pingpong:44: error: no matching function for call to 'RA8875::RA8875(int, int, int)' C:\Users\ivan\Documents\Arduino\libraries\RA8875/RA8875.h:246: note: candidates are: RA8875::RA8875(uint8_t, uint8_t) C:\Users\ivan\Documents\Arduino\libraries\RA8875/RA8875.h:232: note: RA8875::RA8875(const RA8875&) pingpong.ino: In function 'void setup()': pingpong:62: error: 'class RA8875' has no member named 'armTouchISR' pingpong.ino: In function 'void paddleRead()': pingpong:208: error: 'class RA8875' has no member named 'armTouchISR'

fillScreen_vs_clearScreen.ino

fillScreen_vs_clearScreen.ino: In function 'void loop()': fillScreen_vs_clearScreen:52: error: 'class RA8875' has no member named 'fillScreen'

fontRendering.ino

fontRendering.ino:9:39: error: fonts/Square_Pixel714.h: No such file or directory fontRendering.ino:10:41: error: fonts/Imagine_FontFixed__15.h: No such file or directory fontRendering.ino: In function 'void setup()': fontRendering:35: error: 'class RA8875' has no member named 'gPrint' fontRendering:35: error: 'Imagine_FontFixed15' was not declared in this scope

load24bitImages

load24bitImages:16: error: size of array 'image_data_batman_ume' is too large load24bitImages.ino: In function 'void setup()': load24bitImages:41: error: 'image_data_batman_ume' was not declared in this scope

Thanks for all!!

WerkAG commented 8 years ago

fillScreen_vs_clearScreen:52: error: 'class RA8875' has no member named 'fillScreen'

Try tft.fillWindow() instead of tft.fillScreen()

fontRendering.ino

Font rendering is working! Try with another font (check library fonts dir). It seems "gPrint" is no more used (don't know if it as used in the past), to invoke the desired font, use: tft.setFont(&arial_numbers);

sumotoy commented 8 years ago

some examples are outdated, specially the arduino uno/due ones because survived trough releases, the 0.70 has massive changes and I forget to update. You can use as reference the examples in Teensy folder and change te initialization for arduino. 32 bit processor has many interrupts so they can assign an interrupt to any pin but UNO (and mega, etc.) are hardware limited so you must refere to your MCU specification when using an a pin connected to an interrupt (if I'm not wrong, UNO and MEGA uses INT 0 for pin 2). Btw the library can avoid interrupt and uses digitalRead, this can use virtually any pin, I have tested UNO in the past and was working and since then I don't changed too much the code but for b11 I was thinking to simplify it so this was my job for tomorrow and spare time during next week since I'm almost done the new text optimized rendering engine and the text conversion program. Which touchscreen you are using? Capacitive or resistive? And which PIN are you sensing for touch actually?

The examples will be fixed for b11.

ivanbarquero commented 8 years ago

Hello, and thanks for your answer. I used he examples in Teensy folder and it worked ok. I Solved the problem with touch screen. I was using int from RA8875 instead of FT5206's int

thanks

sumotoy commented 8 years ago

Cool! Take a look for future library upgrades, the new b11 it's on the way and will have complete custom user font support, much faster user font rendering, font conversion utility and a lot of small bugs solved.