Go Down

Topic: 2.8 tft ILI9325 touch menu's? (Read 5 times) previous topic - next topic


Hi I'm using a 2.8 tft ILI9325 touch screen with a arduino mega and RGB LEDs.

I have build a sweet PC fan controller with touch menu. All is well in that department.

But I've added RGB LEDs to the mix. So what I'm trying to figure out is there a way i can put a button on the screen that will change the
menu (i.e for RGB control) then push done button to go back to fan control screen. <- this will be easy enough just screenfill then rebuild.)

The part I think I can't seem to figure out how to code it to change the touch screen input area when menu changes.

I've searched pretty hard and havn't found much. Can anyone direct me somewhere that has tried this with any code examples. Or offer some input.

Would making one touch area a (not sure what it's called but) void function:
Void firstmenu()
{ blah blah touch areas do this etc..


Has anyone done a menu with this screen from adafruit?

I do have a sdcard for it as well. I'm just tring to figure it out.

Where can i look who can i ask Anyone?


:D aonde eu encontro este menu?
estou construindo um projeto de Water Cooling com assistência de pastilhas de Peltier. Seria bem útil este menu!  8)


I was thinking to use the edge middles and corners to point up/down right/left and diagonals for a 9 page menu and I had an idea for vector position location that I am going to try to write this month. I have 2 of the 3.2" displays from Electrodrogon (@17.00 ea US) W/o shield for a mega (6.00 more) and I will need at least 4 menu's. I'll try to post my results.

--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard


Dec 06, 2012, 02:03 am Last Edit: Dec 06, 2012, 02:22 am by urthlight Reason: 1
I think I have the same display from electrodragon. I bought them as backups while the adafruit displays were on back order. But then we got the last two 2.8 TFTs from Ada. So in a week or so I will try my hand at the cheap ones.
However I did find this
Code: [Select]

* Touch Control Panel
* Copyright 2009 Jonathan Oxer <jon@oxer.com.au>
* Copyright 2009 Hugh Blemings <hugh@blemings.org>
* Reads touch coordinates on a Nintendo DS touch screen attached to an
* Arduino and compares them to defined hot zones representing buttons
* and sliders. If a touch occurs within a hot zone a matching event
* message is sent to the host via the serial port.
* Based on the ReadTouchscreen example included in the TouchScreen
* library.
*   www.practicalarduino.com/projects/touch-control-panel
#include <TouchScreen.h>

TouchScreen ts(3, 1, 0, 2);

void setup()

void loop()
  int coords[2];

  if((coords[0] > 696) && (coords[0] < 866)
  && (coords[1] > 546) && (coords[1] < 831)) {
    Serial.print(", Fan ON");
  if((coords[0] > 696) && (coords[0] < 866)
  && (coords[1] > 208) && (coords[1] < 476)) {
    Serial.print(", Fan OFF");
  if((coords[0] > 420) && (coords[0] < 577)
  && (coords[1] > 540) && (coords[1] < 866)) {
    Serial.print(", Drapes OPEN");
  if((coords[0] > 420) && (coords[0] < 577)
  && (coords[1] > 208) && (coords[1] < 476)) {
    Serial.print(", Drapes CLOSE");
  if((coords[0] > 139) && (coords[0] < 327)
  && (coords[1] > 208) && (coords[1] < 866)) {
    Serial.print(", Illumination:");
    Serial.print(constrain(map(coords[1], 318, 756, 0, 100), 0, 100));

  delay (100);

Go Up