Connecting TFT LCD Touch Screen with Nodemcu/ ESP8266


Connecting TFT LCD Touch Screen with Nodemcu/ ESP8266



Many time we need a real time device to monitor and operate remotely. Mobile or laptop may not be suitable for that purpose because we don’t need much interactions and the device need to work 24*7. We can create such a device by connecting a touch screen with nodemcu. So lets see how can we connect the two and code it for interaction.

Things we need :
  1.  TFT LCD Display Touch Panel SPI (ILI9341)
  2. Nodemcu
  3. 20 jumper wires
  4. Breadboard
  5. Stylus
Connections
Below is the connection between Touch screen and Nodemcu :
  • VCC  to 3.3V
  • GND to GND
  • CS to D8
  • RESET to RST
  • DC to D4
  • SDI (MOSI) to D7
  • SCK to D5
  • LED to 3.3V
  • SDD (MISO) to D6
  • T_CLK to D5
  • T_CS to D2
  • T_DIN to D7
  • T_DO to D6
  • T_IRQ to D1
(Note for the pins that have same connections we will have to use breadboard)
Next, we need to install libraries. Adafruit_GFX and SPI library can be installed from library Manager. Other library that we need you can download here.
Next, we need to find out the calibration parameter of the touch screen. Calibration is matching the graphics on the display to the output from the touch-screen controller. In other words, converting the display coordinates to touch coordinates.  Use the code below to find the calibration parameter :
After uploading the code touch the cross sign with stylus. Repeat it again with another cross sign you see after that. Now take note down of calibration parameter.
Finally we will upload the code below that creates a simple interface of phone calling UI :

SHARE

Oscar perez

Arquitecto especialista en gestion de proyectos si necesitas desarrollar algun proyecto en Bogota contactame en el 3006825874 o visita mi pagina en www.arquitectobogota.tk

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comentarios:

Publicar un comentario