I am trying to use the Arduin-o-phone sketch from this website, but I have this TFT from Maplin and I couldn't figure out how to use that instead of the Adafruit TFT.
Could anyone help me with code alterations? I would prefer not to have to buy a second touchscreen for my Arduino.
Thanks.
Arduin-o-phone with different TFT
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_mike
- Posts: 67485
- Joined: Thu Feb 11, 2010 2:51 pm
Re: Arduin-o-phone with different TFT
You can probably make things work, but will have to do one of two things:
1) Copy the parts of the GFX library used in the Arduin-o-phone project over to code that uses whatever libraries exist for the display you have.
2) Write a library wrapper that makes your display fit into the GFX ecosystem.
The GFX library provides graphics operations for all our displays. We use it as a base class for display-specific libraries, with the function .drawPixel() being the main hook between the two. All the functions in GFX are written using .drawPixel(), and the display-specific libraries handle the mechanics of communicating with the display driver. There's also a set of optional 'fast' drawing operations that can be defined in the device-specific libraries, if the display has special features that support drawing lines, filling areas with color, etc.
1) Copy the parts of the GFX library used in the Arduin-o-phone project over to code that uses whatever libraries exist for the display you have.
2) Write a library wrapper that makes your display fit into the GFX ecosystem.
The GFX library provides graphics operations for all our displays. We use it as a base class for display-specific libraries, with the function .drawPixel() being the main hook between the two. All the functions in GFX are written using .drawPixel(), and the display-specific libraries handle the mechanics of communicating with the display driver. There's also a set of optional 'fast' drawing operations that can be defined in the device-specific libraries, if the display has special features that support drawing lines, filling areas with color, etc.
Please be positive and constructive with your questions and comments.