Playing with $7 2.4'' inch TFT with touchscreen shield for Arduino

Hi guys!

These days I am playing with a new toy for Arduino I founded on eBay. It is a 2.4'' inches TFT with touchscreen with a resolution of 320 x 240 for less than $7 you can find in this link.

Firstly it was a little hard to make it run, because image was x-mirrored using the libraries I founded on Canton-Electronics (check Document Download at right of the webpage) so I needed to search for more. Finally I succeded using the Adafruit libraries you can find them here.

This discovery it's an important milestone for my domotic project (I didn't write before but indeed I will) to make nodes to control temperature, blinds or lights. First I need is to create a menu to access to these different utilities. Following video will show you my advances.

 

 

Next work will be to connect it through bluetooth or any other radio interface to the central computer (raspberry, cubie or similar) to centralize the information and control it from mobile phone or tablet and add a temperature sensor to be able to monitorize the room temperature.

Finally I will design a case for it, ready to be printed on my 3D printer. Are you ready for it?? Just follow my website next days!

You can  download the code from here.

 

Comments

problem with the TFT driver - 7781 controller

Dear Raul,

First of all nice job, with your tutorial: Playing with $7 2.4'' inch TFT with touchscreen shield for Arduino
[ http://rdepablos.merlitec.com/mixed/playing-with-tft-with-touchscreen-ar... ]

But I have some questions/problems

  1. Could you explain what this code do?
    readReg(0x00, 16, "ILI9320, ILI9325, ILI9335, ...");
  2. .

  3. Because of the nice result I tried first to get your code working on my arduino.

    After changing the code - the touch function works fine.

    Point p;
    to
    TSPoint p;

    But unfortunately the display self doesn't works for my TFT driver- a 7781 video controller.

  4. I found via google

    Is there a way to get your code working for the 7781 ?

Thanks on beforehand for your time and effort.

I have test code for testing the screen, display for the TFT :
https://drive.google.com/open?id=0B_vGp6rdca--WWdwcTYwNzlhUXc
[contains a preview possibility | ino and zip file]

Kindly regards,

Alex

Thank You

Hi Pablos very good project
Thank you
Pericle

Pins for TouchScreen

In Looking at the domonode code, I noticed that you were using A1 and A2 for the TouchScreen:
// TouchScreen
#define YP A2 // must be an analog pin, use "An" notation!
#define XM A1 // must be an analog pin, use "An" notation!
#define YM 6 // can be a digital pin
#define XP 7 // can be a digital pin

But when I look at the pins used for the LCD screen, A2 is also used for the Command/Data
// LCD Screen
#define LCD_CS A3 // Chip Select goes to Analog 3
#define LCD_CD A2 // Command/Data goes to Analog 2
#define LCD_WR A1 // LCD Write goes to Analog 1
#define LCD_RD A0 // LCD Read goes to Analog 0
#define LCD_RESET A4
#define BUFFPIXEL 20

Is this how they are wired? Will this cause a problem?

Hi Brian, the key with that

Hi Brian,

the key with that is to multiplex the pin using the LCD_CS. When LCD_CS is disabled, all LCD will not read LCD_CD (A2) and you can use touchscreen.

This is why you see:

In my code:   pinMode(XP, OUTPUT);

In getPoint method:   pinMode(_yp, INPUT);

 

Best Regards!

Hi Pablos very good

Hi Pablos very good project
Thank you
Best regards darkbil.

Thanks darkbil! I have some

Thanks darkbil!
I have some updates, i'll notify you when published.
Best regards!

Hi Raul of curse i look fwd

Hi Raul of curse i look fwd thank you