lewisxhe / esp32-camera-screen

TTGO T-camera Plus
https://ru.aliexpress.com/item/TTGO-T-camera-Plus-ESP32-DOWDQ6-8-MB-SPRAM-OV2640-1-3/32971057846.html?fbclid=IwAR1uUoWC-UiemD8rKwg15WvpM7zhtvxUxdZhh0jnbrkFkNah6MV6Stg5Kag
65 stars 52 forks source link

fatal error: iot_lcd.h No such file or directory #8

Closed allenck closed 5 years ago

allenck commented 5 years ago

I am trying to compile esp32-camera-screem and get this error. I am aware that this problem has been reported previously and the solution was supposed to be to use the esp-who framework. I installed the esp-who framework and still get the error. The file iot_lcd.h appears to be a component of esp-iot-solution and I have not been able to locate it in the esp-who framework. Am I missing something simple here?

lewisxhe commented 5 years ago

@allenck The LCD driver seems to have been removed from the esp-who framework. Please roll back the version to the old version. git reset --hard 994cb1

allenck commented 5 years ago

That doesn't seem to change any code or restore the missing files. Is there some way to clone the version 994cb1 from scratch since I don't need the latest changes?

lewisxhe commented 5 years ago

@allenck I mean to roll back the old version of the esp-who framework, it will restore these files

allenck commented 5 years ago

I appear to have gotten the esp-who framework rolled back as iot_lcd.h now shows up. <allen@laptop3:~/esp/esp-who$ git checkout -b old-project-state 994cb1 M components/esp-face M components/esp32-camera M esp-idf Switched to a new branch 'old-project-state' allen@laptop3:~/esp/esp-who$ ls -l total 40 -rw-rw-r-- 1 allen allen 668 Apr 9 01:03 CHANGELOG.md drwxrwxr-x 7 allen allen 4096 Apr 9 10:42 components drwxrwxr-x 5 allen allen 4096 Apr 6 00:20 docs drwxrwxr-x 7 allen allen 4096 Apr 6 00:21 esp-idf drwxrwxr-x 3 allen allen 4096 Apr 6 00:20 examples drwxrwxr-x 2 allen allen 4096 Apr 9 01:03 img -rw-rw-r-- 1 allen allen 1187 Apr 6 00:20 LICENSE -rw-rw-r-- 1 allen allen 4887 Apr 9 01:03 README.md drwxrwxr-x 3 allen allen 4096 Apr 6 00:20 tools allen@laptop3:~/esp/esp-who$ ls components component_conf.mk esp32-camera esp-face fb_gfx lcd recorder_engine allen@laptop3:~/esp/esp-who$ ls components/lcd Adafruit-GFX-Library component.mk include README.md test adaptation.cpp font7s.c iot_lcd.cpp spi_lcd.c allen@laptop3:~/esp/esp-who$ ls components/lcd/include font7s.h glcdfont.h iot_lcd.h spi_lcd.h gfxfont.h image.h lcd_image.h WProgram.h allen@laptop3:~/esp/esp-who$

However, I am still getting the error: fatal error: iot_lcd.h: No such file or directory

include "iot_lcd.h"

I thought the problem might be that esp-who/components/component_conf.mk does not reference 'components/lcd'

lewisxhe commented 5 years ago

@allenck You can see that I have not reported an error here. Component_conf.mk does not need to include lcd. I suggest you clone the new repository and then roll back the esp-who version to try again. QQ截图20190410085651

allenck commented 5 years ago

I do not understand where you got this project, "camera_display4-n0-bme" from. It is not one of the examples in the esp-who repository: https://github.com/espressif/esp-who/tree/master/examples/single_chip

and the project that I am having problems compiling is: https://github.com/lewisxhe/esp32-camera-screen

I am beginning to wonder if I'm thinking of Apples while you are thinking of Oranges.

lewisxhe commented 5 years ago

Why do you care about the file name so much? I have already displayed the commit number on the terminal. This is the same as the repository code. The name of the test folder is different. In order to relieve your doubts, I have re-cloned esp-who. With the latest version, you only need to put the old version of the lcd folder into the newly cloned framework and compile it again. QQ图片20190411094938

allenck commented 5 years ago

You make absolutely no sense. I don't understand why this esp-who framework is involved sine I am trying to compile this project, Latest commit 8b42c7d on Mar 3 image

allenck commented 5 years ago

I believe I have discovered the missing piece of information. After you download the esp-camea-screen project, you must extract it into the esp-who/examples/single-chip directory. After I did that and ran make, the project now compiles OK.

However, the app does not display anything on the screen after you speak "nihaotinmao" If you start looking at the serial output, it is apparent the the software is in a loop displaying [0;31mE (340599) [main]: Camera capture failed over and over.

Rebooting the device gives this display: rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0018,len:4 load:0x3fff001c,len:6640 ho 0 tail 12 room 4 load:0x40078000,len:10988 load:0x40080400,len:7320 entry 0x40080780 I (30) boot: ESP-IDF v3.2-beta3 2nd stage bootloader I (30) boot: compile time 09:55:16 I (39) boot: Enabling RNG early entropy source... I (39) qio_mode: Enabling QIO for flash chip WinBond I (41) boot: SPI Speed : 80MHz I (45) boot: SPI Mode : QIO I (49) boot: SPI Flash Size : 4MB I (53) boot: Partition Table: I (56) boot: ## Label Usage Type ST Offset Length I (64) boot: 0 factory factory app 00 00 00010000 00300000 I (71) boot: 1 nvs WiFi data 01 02 00310000 00004000 I (79) boot: 2 fr unknown 20 20 00320000 00020000 I (86) boot: End of partition table I (90) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x1bcd38 (1822008) map I (581) esp_image: segment 1: paddr=0x001ccd60 vaddr=0x3ffb0000 size=0x032b0 ( 12976) load I (585) esp_image: segment 2: paddr=0x001d0018 vaddr=0x400d0018 size=0xa8520 (689440) map 0x400d0018: _stext at ??:?

I (769) esp_image: segment 3: paddr=0x00278540 vaddr=0x3ffb32b0 size=0x005f0 ( 1520) load I (770) esp_image: segment 4: paddr=0x00278b38 vaddr=0x40080000 size=0x00400 ( 1024) load 0x40080000: _WindowOverflow4 at /home/allen/esp/esp-who/esp-idf/components/freertos/xtensa_vectors.S:1779

I (776) esp_image: segment 5: paddr=0x00278f40 vaddr=0x40080400 size=0x1b9a8 (113064) load I (838) boot: Loaded app from partition at offset 0x10000 I (838) boot: Disabling RNG early entropy source... I (839) spiram: Found 64MBit SPI RAM device I (843) spiram: SPI RAM mode: flash 80m sram 80m I (849) spiram: PSRAM initialized, cache is in low/high (2-core) mode. I (856) cpu_start: Pro cpu up. I (860) cpu_start: Starting app cpu, entry point is 0x40081770 0x40081770: call_start_cpu1 at /home/allen/esp/esp-who/esp-idf/components/esp32/cpu_start.c:246

I (0) cpu_start: App cpu up. I (1354) spiram: SPI SRAM memory test OK I (1355) heap_init: Initializing. RAM available for dynamic allocation: I (1355) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (1361) heap_init: At 3FFCAD80 len 00015280 (84 KiB): DRAM I (1368) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (1374) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (1380) heap_init: At 4009BDA8 len 00004258 (16 KiB): IRAM I (1387) cpu_start: Pro cpu start user code I (1392) spiram: Adding pool of 4096K of external SPI memory to heap allocator I (70) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (70) esp-eye: Version 0.9.0 I (74) gpio: GPIO[0]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (161) gpio: GPIO[19]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (161) gpio: GPIO[22]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (168) gpio: GPIO[21]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (178) gpio: GPIO[13]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 SCCB_Write [ff]=01 failed SCCB_Write [12]=80 failed E (337) camera: Camera probe failed with error 0x20001 E (337) app_camera: Camera init failed with error 0x20001 I (338) gpio: GPIO[12]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 wake word number = 1, word1 name = nihaotianmao I (6769) I2S: DMA Malloc info, datalen=blocksize=2400, dma_buf_count=3 wake word number = 1, word1 name = nihaotianmao I (6769) I2S: PLL_D2: Req RATE: 16000, real rate: 16025.000, BITS: 32, CLKM: 39, BCK: 4, MCLK: 4096000.000, SCLK: 1025600.000000, diva: 64, divb: 4 W (6774) I2S: I2S driver already installed

I assume that the camera is not configured properly. The only option in make menuconfig that I can set that involves the camera only allows choosing between OV2640 Support and/or OV7725 Support.

allenck commented 5 years ago

I've solved the camera initialization problem, These lines of text need to be added to the file ~/esp/esp-who/examples/single_chip/esp32-camera-screen-master/main/Kconfig.projbuild

menu "Camera Pins" choice CAMERA_MODEL bool "Select Camera Pinout" default CAMERA_MODEL_WROVER_KIT help Select Camera Pinout.

config CAMERA_MODEL_WROVER_KIT bool "WROVER-KIT With OV2640 Module" config CAMERA_MODEL_ESP_EYE bool "ESP_EYE DevKit" config CAMERA_MODEL_M5STACK_PSRAM bool "M5Stack Camera With PSRAM" config CAMERA_MODEL_AI_THINKER bool "ESP32-CAM by AI-Thinker" config CAMERA_MODEL_CUSTOM bool "Custom Camera Pinout" endchoice

config CAMERA_PIN_PWDN depends on CAMERA_MODEL_CUSTOM int "Power Down pin" range -1 33 default -1 help Select Power Down pin or -1 for unmanaged.

config CAMERA_PIN_RESET depends on CAMERA_MODEL_CUSTOM int "Reset pin" range -1 33 default -1 help Select Camera Reset pin or -1 for software reset.

config CAMERA_PIN_XCLK depends on CAMERA_MODEL_CUSTOM int "XCLK pin" range 0 33 default 21 help Select Camera XCLK pin.

config CAMERA_PIN_SIOD depends on CAMERA_MODEL_CUSTOM int "SIOD pin" range 0 33 default 26 help Select Camera SIOD pin.

config CAMERA_PIN_SIOC depends on CAMERA_MODEL_CUSTOM int "SIOC pin" range 0 33 default 27 help Select Camera SIOC pin.

config CAMERA_PIN_VSYNC depends on CAMERA_MODEL_CUSTOM int "VSYNC pin" range 0 39 default 25 help Select Camera VSYNC pin.

config CAMERA_PIN_HREF depends on CAMERA_MODEL_CUSTOM int "HREF pin" range 0 39 default 23 help Select Camera HREF pin.

config CAMERA_PIN_PCLK depends on CAMERA_MODEL_CUSTOM int "PCLK pin" range 0 39 default 25 help Select Camera PCLK pin.

config CAMERA_PIN_Y2 depends on CAMERA_MODEL_CUSTOM int "Y2 pin" range 0 39 default 4 help Select Camera Y2 pin.

config CAMERA_PIN_Y3 depends on CAMERA_MODEL_CUSTOM int "Y3 pin" range 0 39 default 5 help Select Camera Y3 pin.

config CAMERA_PIN_Y4 depends on CAMERA_MODEL_CUSTOM int "Y4 pin" range 0 39 default 18 help Select Camera Y4 pin.

config CAMERA_PIN_Y5 depends on CAMERA_MODEL_CUSTOM int "Y5 pin" range 0 39 default 19 help Select Camera Y5 pin.

config CAMERA_PIN_Y6 depends on CAMERA_MODEL_CUSTOM int "Y6 pin" range 0 39 default 36 help Select Camera Y6 pin.

config CAMERA_PIN_Y7 depends on CAMERA_MODEL_CUSTOM int "Y7 pin" range 0 39 default 39 help Select Camera Y7 pin.

config CAMERA_PIN_Y8 depends on CAMERA_MODEL_CUSTOM int "Y8 pin" range 0 39 default 34 help Select Camera Y8 pin.

config CAMERA_PIN_Y9 depends on CAMERA_MODEL_CUSTOM int "Y9 pin" range 0 39 default 35 help Select Camera Y9 pin.

endmenu

menu "Face Detection" config ESP_FACE_DETECT_ENABLED bool "ESP-WHO Face Detection" default y help Enables ESP-WHO Face Detection through the web interface.

config ESP_FACE_RECOGNITION_ENABLED bool "ESP-WHO Face Recognition" depends on ESP_FACE_DETECT_ENABLED default y help Enables ESP-WHO Face Recognition through the web interface.

endmenu >

Then run make menuconfig and assign the proper values (as printed on the circuit board) for the camera pins. (note that the value for Y7 in the README.md file is incorrectly stated as '26' instead of '36'!)

allenck commented 5 years ago

Although it is now possible to compile the project, I have been unable to get the camera to work. As far as I can tell, the pin settings for the camera are OK and it does work with the Camera-web-server example. Here is the relevant serial monitor putput:

<[0;32mI (113) esp-eye: Version 0.9.0 I (117) gpio: GPIO[0]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0  I (204) gpio: GPIO[19]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  I (204) gpio: GPIO[22]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  I (211) gpio: GPIO[21]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  I (221) gpio: GPIO[13]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  SCCB_Write [ff]=01 failed SCCB_Write [12]=80 failed E (380) camera: Camera probe failed with error 0x20001 E (380) app_camera: Camera init failed with error 0x20001 I (381) gpio: GPIO[12]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0  wake word number = 1, word1 name = nihaotianmao

lewisxhe commented 5 years ago

Have read the readme, please check