Skip to content

Touchsy ESP-32 offers the ideal display solution for users who favor ESP-32 over Raspberry Pi Pico W. This Github provides getting started guide for ESP32 Resistive Variant of Touchsy Family.

License

sbcshop/3.2_Touchsy_ESP-32_Resistive_Software

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3.2_Touchsy_ESP-32_Resistive_Software

Touchsy ESP-32 offers the ideal display solution for users who favor ESP-32 over Raspberry Pi Pico W. With ESP-32, you enjoy the flexibility to program your display using the Arduino platform, making it compatible with a wide range of projects and applications, including IoT and robotics.

This Github provides getting started guide for ESP32 Resistive Variant of Touchsy Family.

You also have the choice between Resistive and Capacitive touchscreens to suit your specific requirements. Additionally, the additional GPIO pins breakout provided for convenience of connecting additional hardware to your display.

Here are the features and specifications that make Touchsy ESP-32 a unique and must-have accessory:

Features:

  • Integrated ESP32-S3 WROOM 1 module, supports 2.4 GHz Wi-Fi and Bluetooth 5 (LE)
  • 3.2” TFT Resistive Touch Display for visual interaction
  • SD card slot for storage and data transfer
  • Battery port connector with Battery Management for portable use (3.7V Lithium)
  • Remaining GPIO pins breakout for connecting more hardware, Serial and direct USB
  • Type C interface for both Programming and Power
  • Additional power supply facility for use with other peripheral
  • Perfect security mechanism, support AES-128/256, Hash, RSA, HMAC, digital signatures and secure boot
  • RESET button. Press this button to reset the system.
  • BOOT button. Hold down the Boot button and press the RESET button to initiate firmware download mode. Users can download firmware through the serial port
  • 2 additional programmable buttons for customizable control options

Specifications:

  • Wi-Fi Protocol: 802.11b/g/n (802.11n up to 150Mbps) Wi-Fi Frequency Range: 2.402GHz - 2.483Ghz
  • Support Bluetooth 5
  • Operating voltage of pins 3.3V and board supply 5V
  • 3.2” Display with resolution 240 × 320
  • ILI9341 Display Driver
  • XPT2046 resistive touch controller
  • Appearance: RGB
  • Colors: 65K/262K
  • Viewing Angle(in degree): Left:70, Right:70, Up:50, Down:70
  • Operating Temperature is -20℃~70℃
  • Storage Temperature is -30℃~80℃

Getting Started with 3.2 Touchsy ESP-32 Resistive

Pinout

  • (1) 3.2” Resistive Touch Display
  • (2) Extra GPIO breakout
  • (3) Buzzer
  • (4) Battery connection port
  • (5) Power pins breakout
  • (6) Type C for Programming and Power both
  • (7) Additional GPIO breakout
  • (8) SD card slot
  • (9) ESP32 S3 module
  • (10) Boot Button
  • (11) Reset Button
  • (12) Two Programmable Buttons

Interfacing Details

  • Display and Resistive Touch controller interfacing with ESP32

    ESP32 Display Code variables Function
    IO14 DC/SCL SPI _sclk Clock pin of SPI interface for Display
    IO13 SDI SPI/SDA _mosi MOSI (Master OUT Slave IN) pin of SPI interface
    IO12 SDO SPI _miso MISO (Master IN Slave OUT) data pin of SPI interface
    IO15 CS/SPI CS TFT_CS Chip Select pin of SPI interface
    IO21 WR/SPI D/C TFT_DC Data/Command pin of SPI interface
    EN RESET TFT_RST Display Reset pin, Directly connected to enable pin
    IO5 Driven via Transistor TFT_BACKLIGHT_PIN Backlight of display
    ESP32 Resistive Touch Code variables Function
    IO14 DCLK _sclk Clock pin of SPI interface for touch controller
    IO13 DIN _mosi MOSI (Master OUT Slave IN) data pin of SPI interface
    IO12 DOUT _miso MISO (Master IN Slave OUT) data pin of SPI interface
    IO47 CS TOUCH_CS_PIN Chip Select pin of SPI interface
    IO0 PENIRQ TOUCH_IRQ_PIN Touch controller Interrupt pin

    Display setting code snippets view:

      //Define common SPI interfacing pins
      #define _sclk              14
      #define _mosi              13 
      #define _miso              12
      
      //for Display with ESP32
      #define TFT_DC             21
      #define TFT_CS             15 
      #define TFT_RST            -1   // connected to enable pin of esp32 
      
      //for Touch controller with ESP32
      #define TOUCH_CS_PIN       47
      #define TOUCH_IRQ_PIN      0
      
      #define TFT_BACKLIGHT_PIN   5
    
      // to access various display methods
      Adafruit_ILI9341 tft = Adafruit_ILI9341( TFT_CS, TFT_DC, TFT_RST );
    
      // to access resistive touch related method
      XPT2046_Touchscreen touch( TOUCH_CS_PIN, TOUCH_IRQ_PIN );
    
  • ESP32 and micro SD card interfacing

    ESP32 microSD Card Function
    IO42 SCLK Clock pin of SPI interface for microSD card
    IO2 DIN MOSI (Master OUT Slave IN) data pin of SPI interface
    IO41 DOUT MISO (Master IN Slave OUT) data pin of SPI interface
    IO1 CS Chip Select pin of SPI interface

    Sdcard setting code snippets view:

     //Define SPI interfacing pins for micro SD card with ESP32
      #define SD_MOSI 2
      #define SD_MISO 41
      #define SD_SCK 42
      #define SD_CS 1
    
  • Buttons, Buzzer and LED Interfacing with ESP32

    ESP32 Buttons Function
    IO4 BT1 Programmable button
    IO6 BT2 Programmable button
    IO0 Boot Boot Button
    ESP32 Hardware
    IO40 Buzzer
    IO3 LED

    Code snippets:

      const int buzzerPin = 40; //create variable for buzzer pin connected at GPIO40
      const int userButton1 = 4; //for programmable button 1 at GPIO4
      const int userButton2 = 6; //for programmable button 1 at GPIO6
      const int LED = 3;
    
  • Breakout GPIOs

    Breakout 1

    ESP32 Physical Pin Multi-Function
    D- 13 RTC_GPIO19, GPIO19, U1RTS, ADC2_CH8, CLK_OUT2, USB_D-
    D+ 14 RTC_GPIO20, GPIO20, U1CTS, ADC2_CH9, CLK_OUT1, USB_D+
    GP9 4 RTC_GPIO9, GPIO9, TOUCH9, ADC1_CH8, FSPIHD
    GP7 5 RTC_GPIO7, GPIO7, TOUCH7, ADC1_CH6
    GP46 16 GPIO46
    GP10 18 RTC_GPIO10, GPIO10, TOUCH10, ADC1_CH9, FSPICS0, FSPIIO4

    Breakout 2

    ESP32 Physical Pin Multi-Function
    3V3 - Positive Supply 3.3V
    GP43 37 U0TXD, GPIO43, CLK_OUT1
    GP44 36 U0RXD, GPIO44, CLK_OUT2
    GP8 12 RTC_GPIO8, GPIO8, TOUCH8, ADC1_CH7
    GP16 9 RTC_GPIO16, GPIO16, U0CTS, ADC2_CH5, XTAL_32K_N
    GND - Ground pin

1. Configure and Setup Development Environment

  • Download Arduino IDE from official site and install into your system. We have use Arduino IDE 1.8.19

  • Once installation done will add ESP32 board support into IDE, for this first you need to add below link into preference: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

    Select File > Preference, and add link as show in below image,

  • Now will install ESP32 based boards as shown in below image,

  • Once done, keeping default settings select the ESP32 Dev Module with suitable com port (may be different in your case) as shown below,

2. Installing Libraries

  • Download library zip file provided here in github.

  • Extract and copy files inside Document > Arduino > Libraries folder. Make sure to restart Arduino IDE whenever you update or add any libraries.

3. Testing First Code

  • At this step you are all set to test codes, for easy getting started we have provided various demo example codes in github which you can download and try.
  • Open one example code in Arduino and make sure you have selected correct board with suitable com port, click on upload button to transfer code on ESP32 of Touchsy.
  • Checkout other examples below and build your own custom program codes using those references.

Example Codes

Now you are ready to try out your own codes, Happy Coding!

Resources

Related Products

Product License

This is open source product. Kindly check LICENSE.md file for more information.

Please contact support@sb-components.co.uk for technical support.

About

Touchsy ESP-32 offers the ideal display solution for users who favor ESP-32 over Raspberry Pi Pico W. This Github provides getting started guide for ESP32 Resistive Variant of Touchsy Family.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published