• Stars
    star
    103
  • Rank 333,046 (Top 7 %)
  • Language
    C++
  • Created over 4 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

ESP32 3.5" TFT Touch with Camera

/*
Version:		V6.2
Author:			Vincent
Create Date:	2020/8/19
Note:
	V6.2 : Change Wiki link.
	V6.1 : Update firmware add camera config faq.
	V6.0 : Add WiFi bulletin board demo
	V5.0 : Add Environment Expansion Board
	V4.1 : Add 1 show example.
	V4.0 : Add 4 show example.
	V3.4 : Thanks Lovyan03's change. Greatly speed up the rendering process.
	V3.3 : Change UI direction.
	V3.2 : Added the ability to upload photos to PC through WiFi. 
	V3.1 : Replace the picture with the new hardware.
	V3.0 : Delete many useless code. Add FAQ.
	V2.0 : Change ILI9488 driver,use LovyanGFX lib.Ten times faster than before!!!
	
*/

ESP32 Touch Camera

[toc]

Makerfabs

Makerfabs home page

Makerfabs Wiki

ESP32 3.5" TFT Touch with Camera

Introduce

Product link ๏ผš ESP32 Touch Camera(Resistive)

Product link ๏ผš ESP32 Touch Camera(Capacitive)

Wiki link ๏ผšESP32 3.5" TFT Touch with Camera

The ESP32 Touch Camera use ILI9488 screen, which comes with resistive or capacitive screens. Have an OV2640 camera and SD card slot. It can be used as a webcam, an electronic album, or a digital camera. Support for Arduino and MicroPython.

Feature

  • Integrated ESP32 2.4G WiFi and Bluetooth.

  • Micro SD card slot on board.

  • Input 5.0V Type-C USB .

  • OV2640 is a 1/4 inch CMOS UXGA (1632*1232) image sensor manufactured by OmniVision.

  • LCD 3.5 inch Amorphous-TFT-LCD (Thin Film Transistor Liquid Crystal Display) for mobile-phone or handy electrical equipments.

  • NS2009 is A 4-wire resistive touch screen control circuit with I2C interface, which contains A 12-bit resolution A/D converter.

  • The FT6X36 Series ICs are single-chip capacitive touch panel controller IC with a built-in 16 bit enhanced Micro-controller unit (MCU).

front

back

Project

Related projects

ESP32 2048 GAME

Implement a 2048 game on "ESP32 Touch Camera".

2048

ESP32 Flappy Bird

Implement a Flappy Bird game on "ESP32 Touch Camera".

Flappy

Project introduction

Four projects were implemented : "Camera", "Touch_Draw", "SD2TFT" and "Receive WiFi Video".

Camera_V2

  • Take photos with OV2640 camera and preview in real-time on TFT screen.
  • You can save photos to an SD card.
  • Photos taken can be viewed through the TFT screen.

Touch_Draw_V2

  • Use your hand or stylus (resistance screen) to draw on the screen.

Touch_Draw_V2

SD2TFT

  • Display pictures from SD card.
  • Loop back the images in the SD card.

SD2TFT

Receive WiFi Video

Transmit the contents of the monitor to the TFT screen via Wifi.A host computer software is provided to box select the areas of the screen that need to be transferred.

Change from MakePython ESP32 Color LCD ใง ๅ‹•็”ปใ‚’WiFiๅ—ไฟก

  • Upload file : "/Project_Touch-Screen-Camra/ESP32_ScreenShotReceiver-master/ScreenShotReceiver/ScreenShotReceiver.ino"
  • Open "/Project_Touch-Screen-Camra/ESP32_ScreenShotReceiver-master/ScreenShotSender.exe"
  • Input IP on the screen.

wifiscreen

  • Push connect.
  • Start share your screen to TFT.

wifi_screen

Compiler Options

If you have any questions๏ผŒsuch as how to install the development board, how to download the code, how to install the library. Please refer to :Makerfabs_FAQ

  • Install board : ESP32 , select ESP32 version 1.0.6!!!!!!! After 2.0.0 version can't run successfully.
  • 2022/4/28 Add๏ผšI don't know which libraries I updated, 1.0.6 compiles but doesn't drive the camera properly, rolling back the ESP32 version to 1.0.5 works fine.
  • Install library : LovyanGFX library. (SD2TFT is use a different GFX lib, depend on Adafruit_GFX. )
  • Edit the code based on the touch screen. If you use resistive screen, choice NS2009_TOUCH. If you use capacitive screen, choice FT6236_TOUCH.
#define NS2009_TOUCH        //Resistive screen driver    
//#define FT6236_TOUCH      //Capacitive screen driver

#ifdef NS2009_TOUCH
#include "NS2009.h"
const int i2c_touch_addr = NS2009_ADDR;
#endif

#ifdef FT6236_TOUCH
#include "FT6236.h"
const int i2c_touch_addr = TOUCH_I2C_ADD;
#endif
  • Upload codes, select "ESP32 Wrover Module" and "Huge APP"

complair-option

  • Insert a Micro SD card into ESP32 Touch Camera.

How To Use ESP32 Touch Camera

  • Open the serial port monitor after uploading the code.
  • Serial port will return initialization information, pay attention to see if there is any error.
14:48:49.096 -> ets Jun  8 2016 00:22:57
14:48:49.096 -> 
14:48:49.096 -> rst:0x1 (POWERON_RESET),boot:0x17 (SPI_FAST_FLASH_BOOT)
14:48:49.096 -> configsip: 0, SPIWP:0xee
14:48:49.096 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
14:48:49.096 -> mode:DIO, clock div:1
14:48:49.096 -> load:0x3fff0018,len:4
14:48:49.096 -> load:0x3fff001c,len:1100
14:48:49.096 -> load:0x40078000,len:9232
14:48:49.096 -> load:0x40080400,len:6400
14:48:49.096 -> entry 0x400806a8
14:48:50.641 -> ILI9488 Test!
14:48:50.641 -> I2C device found at address 0x38  !
14:48:50.675 -> Card Mount Successed
14:48:50.675 -> SD init over.
14:48:51.397 -> TFT init over.
14:49:10.660 -> Image name๏ผš/0write.bmp
14:49:13.859 -> Image name๏ผš/1write.bmp
  • If the SD card cannot be mounted on return, you need to re-insert the SD card.
  • If everything is normal, the camera interface will be displayed.

camera_ui

  • Press the camera button to take photos automatically.
  • Click on the previous photo to show the last photo saved on the SD card.

camera_last

  • Pressing to show the last photo will stop the camera acquisition. To restore the preview, press open Stream.
  • Restore stream mode to take photos again.
  • You can unplug your SD card and plug it into your computer to view your photos.

camera_sd

V3.2 Upload photos via WiFi

Added the function of sending photos to PC via HTTP protocol by post method.

  • Remove comments before WIFI_MODE
#define WIFI_MODE
  • Set the wifi ssid and password.
// wait for WiFi connection
WiFi.mode(WIFI_STA);
WiFi.begin("Makerfabs", "20160704");
  • Upload code to ESP32 camera.
  • Run the server.py on PC side.(Make sure to run in the directory server.py, otherwise the upload path cannot be found.)

server

  • Every time you click to show the last photo, it will be automatically uploaded.

upload_pic

  • In a few seconds, the picture will be uploaded to the Upload folder.
  • V3.3 : The UI has changed, but the functionality remains the same.

new_ui

V4.0 Show Example

Add 4 example in /Project_Touch-Screen-Camra/example

  • Aht10 show
  • HCSR04 meter
  • Web button
  • Wind speed show

These examples depend on TFT_eSPI library. You must set "User_Setup.h". Set screen type.

// Only define one driver, the other ones must be commented out
//#define ILI9341_DRIVER
//#define ST7735_DRIVER      // Define additional parameters below for this display
//#define ILI9163_DRIVER     // Define additional parameters below for this display
//#define S6D02A1_DRIVER
//#define RPI_ILI9486_DRIVER // 20MHz maximum SPI
//#define HX8357D_DRIVER
//#define ILI9481_DRIVER
//#define ILI9486_DRIVER
#define ILI9488_DRIVER     // WARNING: Do not connect ILI9488 display SDO to MISO if other devices share the SPI bus (TFT SDO does NOT tristate when CS is high)
//#define ST7789_DRIVER      // Full configuration option, define additional parameters below for this display
//#define ST7789_2_DRIVER    // Minimal configuration option, define additional parameters below for this display

// For ST7789, ST7735, ILI9163 and GC9A01 ONLY, define the pixel width and height in portrait orientation
// #define TFT_WIDTH  80
// #define TFT_WIDTH  128
// #define TFT_WIDTH  172 // ST7789 172 x 320
//#define TFT_WIDTH  240 // ST7789 240 x 240 and 240 x 320
#define TFT_WIDTH  320
// #define TFT_HEIGHT 160
// #define TFT_HEIGHT 128
// #define TFT_HEIGHT 240 // ST7789 240 x 240
// #define TFT_HEIGHT 320 // ST7789 240 x 320
//#define TFT_HEIGHT 240 // GC9A01 240 x 240
#define TFT_HEIGHT 480


And set pins.

// For 3.5" 9488
// The hardware SPI can be mapped to any pins

#define TFT_MISO 12
#define TFT_MOSI 13
#define TFT_SCLK 14
#define TFT_CS   15  // Chip select control pin
#define TFT_DC    33  // Data Command control pin
#define TFT_RST   26  // Reset pin (could connect to RST pin)
    

V4.1 Show Example

Add environment monitoring module demo.

  • Line chart

V6.0 WiFi bulletin board Demo

Added a WiFi bulletin board app. You can upload and browse files in the SD card through the web page. And the latest uploaded BMP or TXT display on the 3.5-inch screen.

  • Library Install๏ผšesp32-micro-sdcard and esp32-webserver
  • Upload .\example\wifi_img\wifi_img.ino
  • Insert the SD card and power on.
  • Enter the IP address on the screen in your browser.

  • Select TXT or BMP to be uploaded. BMP must be 480 x 320 pixels, 24 bits.

  • Upload.
  • Wait seconds, the content is displayed on the screen.

FAQ

Q: Can't Upload!

A: Switch to a good USB cable. Poor USB cable quality can cause ESP32 to reboot or fail to upload. Open the serial monitor, observe serial port information.

Q: The screen is white!

A: The SD card was not mounted successfully, so the program goes into an endless loop. Re-insert the SD card and restart it. Open the serial monitor, The serial port will display the work log.

Q: It doesn't show the picture that was just taken!

A: It may be that after shooting, the SD card was not in good contact, so it could not be stored in the SD card. Playback photos are read inside the SD card photos. Re-insert the SD card and restart it.

Q: Other questions...

A: Re-insert the SD card and restart it. Can solve most problems. (laugh)

Q: Camera direction wrong

A: Depending on the batch of purchased cameras, the picture may be inverted. You can configure the following functions.

Change set_vflip() param to flip camera or set_hmirror() to mirror image.

// Camera setting
void camera_init()
{
    // camera config
    
    //...

    sensor_t *s = esp_camera_sensor_get();
    // initial sensors are flipped vertically and colors are a bit saturated
    if (s->id.PID == OV2640_PID)
    {
        s->set_vflip(s, 0);   // vertical flip
        s->set_hmirror(s, 0); // Horizontal mirror

        s->set_brightness(s, 0); // up the blightness just a bit
        s->set_saturation(s, 1); // lower the saturation
    }
    // drop down frame size for higher initial frame rate
    s->set_framesize(s, FRAMESIZE_QVGA);

    show_log(2);
}

More Repositories

1

Makerfabs-ESP32-UWB

C++
189
star
2

Makerfabs-ESP32-UWB-DW3000

C++
77
star
3

Makerfabs-ESP32-S3-Parallel-TFT-with-Touch

C++
62
star
4

Lora-Soil-Moisture-Sensor

Lora Soil Moisture Sensor
C++
50
star
5

ESP32-S3-Round-SPI-TFT-with-Touch-1.28

C
50
star
6

ESP32_IMU_Module

HTML
39
star
7

ESP32-S3-Parallel-TFT-with-Touch-7inch

C
34
star
8

Makerfabs-ESP32-S2-Parallel-TFT-with-Touch

C
32
star
9

MaTouch-ESP32-S3-Rotary-IPS-Display-with-Touch-2.1-ST7701

C++
32
star
10

ESP32-S3-Parallel-TFT-with-Touch-4.3inch

ESP32-S3 Parallel TFT with Touch 4.3inch
30
star
11

Maduino-Zero-4G-LTE

C++
29
star
12

ESP32-S3-Parallel-TFT-with-Touch-4inch

C
23
star
13

PICO_Merchanical_Hand_Driver

Python
22
star
14

ESP32-S2-MLX90640-Touch-Screen-Thermal-Camera

C++
21
star
15

ESPlay

The game source of ESPlay Micro
20
star
16

Project_MakePython_Audio_Music

C++
20
star
17

Makerfabs-ESP32-S3-SPI-TFT-with-Touch

C++
18
star
18

Project_Touch-Camera-ILI9341

C++
16
star
19

Project_ESP32-Web-Radio

C++
16
star
20

Pico_Primer_Kit

C
15
star
21

MaUWB_DW3000-with-STM32-AT-Command

C++
15
star
22

Project_WiFi-Statistics

C++
12
star
23

ESP32-S3-4G-LTE-CAT1-A7670X

C++
12
star
24

Project_IoT-Irrigation-System

Python
11
star
25

Makerfabs_RS485-LoRa-Wireless-Station

C++
11
star
26

Project_Soil-Moisture-Sensor-Wifi

Python
11
star
27

Maduino-Zero-A9G

Maduino Zero A9 or A9G demo code
C++
11
star
28

Makerfabs-MakePython-ESP32-Color-LCD

Python
11
star
29

ESP32-RTOS

C++
10
star
30

ESP32_PLAY

C++
10
star
31

Home-Assistant-AC-Dimmer

C++
10
star
32

Lora-Relay-4Channel

Python
9
star
33

Makerfabs_FAQ

C++
9
star
34

Makepython-ESP32

Python
9
star
35

4G-LTE-Hat-For-Raspberry-Pi

9
star
36

Project_ESP32-2048GAME

C++
8
star
37

Home-Assistant-Weather-Station

C++
8
star
38

Wind-Weather-Station

C++
8
star
39

Project_ESP32-Voice-Interaction

C++
8
star
40

Project_IMU-Car-Racing

Python
7
star
41

Project_Gps-Trace-Analysis

Python
7
star
42

Makerfabs_SmartClock_Kit

C
7
star
43

LoraWAN-Soil-Moisture

C++
7
star
44

Project-ESP32-LVGL

C
7
star
45

Maduino-Zero-Lorawan

C++
6
star
46

Makerfabs_3.5TFT_Lora_Controller

C++
6
star
47

Makerfabs_MaLora

C++
6
star
48

esp_tool

esp download tool for ESP8266 and ESP32 in windows
6
star
49

Lora-Relay

Lora Relay
C++
6
star
50

Project_Lora-Relay-Wifi

Python
6
star
51

ESP32-S3-SPI-TFT-with-Touch-2.8inch

C
6
star
52

MaTouch-ESP32-S3-RotaryIPS-Display1.28-GC9A01

C++
6
star
53

NRF52840

C++
5
star
54

Makerfabs-ESP32-C3-SPI-TFT-with-Touch

C++
5
star
55

SquareLine-Demo

C
5
star
56

Raspi-Voice-Interaction-Hat

Python
5
star
57

Makepython-Lora-Gateway

Python
5
star
58

Project_TTS-Weather-Broadcast

Python
5
star
59

Maduino-CANbus-RS485

C++
5
star
60

Project_ESP32-Flappy-Bird

C++
4
star
61

MaESP-ESP32-C3-OLED

C++
4
star
62

Game

Python
3
star
63

MakePython-Lora

Python
3
star
64

Industrial-grade-Soil-Remote-Monitor-V2

C++
3
star
65

Project-Wind-weather-station

C
3
star
66

Makerfabs-Lora-AC-Dimmer

C++
3
star
67

Project_Wakemaster-Alarm-Clock

C++
3
star
68

MakePython

Play MakePython with python
3
star
69

MaduinoLoraRadio

Maduino Lora Radio
C++
3
star
70

MakePython-A9G

Python
3
star
71

Home-Assistant-Relay-8-Channel

C++
3
star
72

SenseLoRa-LoRa-Receiver

C++
3
star
73

Makerfabs_SerLCD

C++
2
star
74

Makerfabs_Raspi_AI

Python
2
star
75

Makerfabs-LoRa_TDS_sensor

C++
2
star
76

Maduino-Power-Line-Modem

C++
2
star
77

nodemcu_integer_0.9.6

nodemcu_integer_0.9.6-dev_20150704
2
star
78

MakerPython-Audio

MakerPython Audio(ESP32+uDA1443)
2
star
79

4G-LTE-CAT1-Air-Monitor

C++
2
star
80

MaTouch-1.9inch-TFT-Breakout

MaTouch 1.9โ€œ TFT Breakout, ESP32-S3 with 1.9" TFT
C
2
star
81

4-Channel-Lorawan-Relay

C++
2
star
82

SenseLoRa-Industrial-grade-Air-Monitor

C++
2
star
83

MQTT

Python
1
star
84

Mabee_Soil-Mositure

C++
1
star
85

Mabee

C++
1
star
86

3.5-inch-TFT-Display-480x320-for-Mega

3.5 inch TFT Display 480x320 for Mega
1
star
87

ESP32-S3-4G-LTE-CAT1-SIM7670G

ESP32-S3-4G-LTE-CAT1-SIM7670G
C++
1
star
88

MaESP-ESP32-Dev-Kit

The source for MaESP ESP32 Dev Kit
Python
1
star
89

ESP32-S3-Parallel-TFT-with-Touch-1.9inch

ESP32-S3 Parallel TFT with Touch 1.9inch
C
1
star
90

Home-Assistant-Controller-8-Channel

C++
1
star
91

DIY-ESP-Smartwatch-Kit

DIY ESP-Smartwatch Kit
1
star
92

ESP32S3-IR-Temperature-Monitor

C++
1
star
93

MaTouch_Knob

C
1
star
94

MaUWB_ESP32S3-with-STM32-AT-Command

C++
1
star
95

ESP32-WiFi-AC-Dimmer

C++
1
star
96

MaTouch-simplified-packages-for-squareline

1
star
97

NBIOT-Air-Monitor

C++
1
star
98

SIM808_Demo

Maduino Zero SIM808 GPS Tracker v3.5
C++
1
star
99

MaduinoZeroNFC

MaduinoZeroNFC
C++
1
star
100

MaPIE

C++
1
star