A simple 3.2" tft color lcd with touch panel test project

Status
Not open for further replies.

oldspring

New Member
Hello all,

I just found and bought a serial 3.2" TFT LCD module with Touch Panel. Also it came with a micro SD card (All of test source code and images are in it)

I have checked most of the project codes. they look ok.
Now I made a simple touch screen project to show you. It is the simplest and easiest way to build a very nice user interface. I high recommend to use this module for your project or products.

I use Arduino Duemilanove to build this project, you can use any MCU to control it.
Below is my test project information:

MCU:
Arduino Duemilanove (you can find it any where)

JP serial 3.2"TFT LCD Module: (It come with TFT LCD and Micro SD Card)
**broken link removed**
**broken link removed**

SD Card code:
Code:
L@,65535
LC,45,150,1,31,65535,OldSpring Touch Panel.
LC,95,110,1,31,65535,project test.
ZD,8
T3,0
L@,59160
Ld,115,120,90,90,59160
Le,120,125,80,80,59160
Mi,125,130,spring
T2,1,18,10,40,40,face1s,facedn
T2,2,78,10,40,40,face2s,facedn
T2,3,138,10,40,40,face3s,facedn
T2,4,198,10,40,40,face4s,facedn
T2,5,258,10,40,40,face5s,facedn
T2,6,18,60,40,40,face6s,facedn
T2,7,78,60,40,40,face7s,facedn
T2,8,138,60,40,40,face8s,facedn
T2,9,258,60,40,40,face9s,facedn
T2,10,198,60,40,40,faceas,facedn
T2,11,18,110,40,40,facebs,facedn
T2,12,258,110,40,40,face1s,facedn
T4,1
end

Arduino cose:
Code:
/*==============================================================
File........JP Serial 3.2" TFT color LCD display module
            A Touch Spring Test code for Arduino
Purpose.....This test code for JP Serial 3.2" TFT color LCD display module
Software....Arduino 1.52
MCU.........Arduino Duemilanove
Auther......OldSpring
Website.....WWW.-------.com
Email.......oldsprings@yahoo.com
Started.....
Updated.....
Note: The module Rx <===> Tx of Arduino
      The module Tx <===> Rx of Arduino
=================== Parameter =============================*/
byte Serial_Read;
void setup()
{
  Serial.begin(9600); 
  Serial.setTimeout(50);     
  delay(1000);
  OldSpring();
}
 
void delay_m() {
  delay(200);
}
// ================== Touch Spring Function Test =======================
void OldSpring() {
    Serial.write("ZO,spring");  // Run a preprogram file in MMC card
    Serial.write(13);              // end char
    delay(2000);
 
 
}
//=========================== System Loop ==============================
void loop(){
    if (Serial.available() > 0) {
        Serial_Read = Serial.read();
        switch (Serial_Read) {
          case 128:    //Button Index = 1 "1" 
                Serial.write("Mi,125,130,face1");
                Serial.write(13);
                delay_m();
                break;
          case 129:    //Button Index = 2 "2"
                Serial.write("Mi,125,130,face2");
                Serial.write(13);
                delay_m();
                break;
          case 130:    //Button Index = 3 "3"
                Serial.write("Mi,125,130,face3");
                Serial.write(13);
                delay_m();
                break;
          case 131:    //Button Index = 4 "4"
                Serial.write("Mi,125,130,face4");
                Serial.write(13);
                delay_m();
                break;
          case 132:    //Button Index = 5 "5"
                Serial.write("Mi,125,130,face5");
                Serial.write(13);
                delay_m();
                break;
          case 133:    //Button Index = 6 '6"
                Serial.write("Mi,125,130,face6");
                Serial.write(13);
                delay_m();
                break;
          case 134:    //Button Index = 7 "7"
                Serial.write("Mi,125,130,face7");
                Serial.write(13);
                delay_m();
                break;
          case 135:    //Button Index = 8 "8"
                Serial.write("Mi,125,130,face8");
                Serial.write(13);
                delay_m();
                break;
          case 136:    //Button Index = 9 "9"
                Serial.write("Mi,125,130,face9");
                Serial.write(13);
                delay_m();
                break;
          case 137:    //Button Index = 10 "0"
                Serial.write("Mi,125,130,facea");
                Serial.write(13);
                delay_m();
                break;
          case 138:    //Button Index = 11 "-"
                Serial.write("Mi,125,130,faceb");
                Serial.write(13);
                delay_m();
                break;
          case 139:    //Button Index = 12 "*"
                Serial.write("Mi,125,130,face1");
                Serial.write(13);
                delay_m();
                break;
          case 140:    //Button Index = 14 "/"
                Serial.write("Mi,125,130,face2");
                Serial.write(13);
                delay_m();
                break;
          case 141:    //Button Index = 15 "="
                Serial.write("Mi,125,130,facea");
                Serial.write(13);
                delay_m();
                break;
              }             
}}









Thanks to electro-tech-online team and all forum users,
OldSpring (Author of the project)
 

Attachments

  • oldspring project files.zip
    83.9 KB · Views: 247
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…