• 大小: 0.15M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2024-04-21
  • 语言: C/C++
  • 标签: Camera  sdcard  ESp32  AR  ES  

资源简介

ESP32 camera sdcard


Camera with Web Server
Preparation
To run this example, you need the following components:

An ESP32 Module: Either ESP32-WROVER-KIT or ESP-EYE, which we highly recommend for beginners, is used in this example.
A Camera Module: Either OV2640 or OV3660 or OV5640 image sensor, which we highly recommend for beginners, is used in this example.
Quick Start
After you've completed the hardware settings, please follow the steps below:

Connect the camera to ESP32 module. For connection pins, please see here
Configure the example through idf.py menuconfig;
Build And Flash the application to ESP32;
Open Your Browser and point it to http://[ip-of-esp32]/;
To Get Image press Get Still or Start Stream;
Use The Options to enable/disable Face Detection, Face Recognition and more;
View The Stream in a player like VLC: Open Network http://[ip-of-esp32]:81/stream;

资源截图

代码片段和文件信息

/* ESPRESSIF MIT License
 * 
 * Copyright (c) 2018 
 * 
 * Permission is hereby granted for use on all ESPRESSIF SYSTEMS products in which case
 * it is free of charge to any person obtaining a copy of this software and associated
 * documentation files (the “Software“) to deal in the Software without restriction including
 * without limitation the rights to use copy modify merge publish distribute sublicense
 * and/or sell copies of the Software and to permit persons to whom the Software is furnished
 * to do so subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in all copies or
 * substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
 * IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER LIABILITY WHETHER
 * IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
#include “esp_log.h“
#include “driver/ledc.h“
#include “esp_camera.h“
#include “app_camera.h“
#include “sdkconfig.h“


static const char *TAG = “app_camera“;

void app_camera_main ()
{
#if CONFIG_CAMERA_MODEL_ESP_EYE || CONFIG_CAMERA_MODEL_ESP32_CAM_BOARD
    /* IO13 IO14 is designed for JTAG by default
     * to use it as generalized input
     * firstly declair it as pullup input */
    gpio_config_t conf;
    conf.mode = GPIO_MODE_INPUT;
    conf.pull_up_en = GPIO_PULLUP_ENABLE;
    conf.pull_down_en = GPIO_PULLDOWN_DISABLE;
    conf.intr_type = GPIO_INTR_DISABLE;
    conf.pin_bit_mask = 1LL << 13;
    gpio_config(&conf);
    conf.pin_bit_mask = 1LL << 14;
    gpio_config(&conf);
#endif

#ifdef CONFIG_LED_ILLUMINATOR_ENABLED
    gpio_set_direction(CONFIG_LED_LEDC_PINGPIO_MODE_OUTPUT);
    ledc_timer_config_t ledc_timer = {
        .duty_resolution = LEDC_TIMER_8_BIT            // resolution of PWM duty
        .freq_hz         = 1000                        // frequency of PWM signal
        .speed_mode      = LEDC_LOW_SPEED_MODE  // timer mode
        .timer_num       = CONFIG_LED_LEDC_TIMER        // timer index
    };
    ledc_channel_config_t ledc_channel = {
        .channel    = CONFIG_LED_LEDC_CHANNEL
        .duty       = 0
        .gpio_num   = CONFIG_LED_LEDC_PIN
        .speed_mode = LEDC_LOW_SPEED_MODE
        .hpoint     = 0
        .timer_sel  = CONFIG_LED_LEDC_TIMER
    };
    #ifdef CONFIG_LED_LEDC_HIGH_SPEED_MODE
    ledc_timer.speed_mode = ledc_channel.speed_mode = LEDC_HIGH_SPEED_MODE;
    #endif
    switch (ledc_timer_config(&ledc_timer)) {
        case ESP_ERR_INVALID_ARG: ESP_LOGE(TAG “ledc_timer_config() parameter error“); break;
    

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         296  2020-09-23 09:06  CMakeLists.txt
     目录           0  2020-09-23 09:06  main\
     文件        4946  2020-09-23 09:06  main\app_camera.c
     文件       39495  2020-09-23 09:06  main\app_httpd.c
     文件        1466  2020-09-23 09:06  main\app_main.c
     文件        7911  2020-09-23 09:06  main\app_mdns.c
     文件        6873  2020-09-23 09:06  main\app_wifi.c
     文件         447  2020-09-23 09:06  main\CMakeLists.txt
     文件         615  2020-09-23 09:06  main\component.mk
     目录           0  2020-09-23 09:06  main\include\
     文件        5622  2020-09-23 09:06  main\include\app_camera.h
     文件         819  2020-09-23 09:06  main\include\app_httpd.h
     文件         929  2020-09-23 09:06  main\include\app_mdns.h
     文件        1436  2020-09-23 09:06  main\include\app_wifi.h
     文件        6298  2020-09-23 09:06  main\Kconfig.projbuild
     目录           0  2020-09-23 09:06  main\www\
     文件         168  2020-09-23 09:06  main\www\compress_pages.sh
     文件       45114  2020-09-23 09:06  main\www\index_ov2640.html
     文件        6787  2020-09-23 09:06  main\www\index_ov2640.html.gz
     文件       70061  2020-09-23 09:06  main\www\index_ov3660.html
     文件        8887  2020-09-23 09:06  main\www\index_ov3660.html.gz
     文件       71089  2020-09-23 09:06  main\www\index_ov5640.html
     文件        9124  2020-09-23 09:06  main\www\index_ov5640.html.gz
     文件      114768  2020-09-23 09:06  main\www\monitor.html
     文件       37438  2020-09-23 09:06  main\www\monitor.html.gz
     文件         306  2020-09-23 09:06  Makefile
     文件         154  2020-09-23 09:06  partitions.csv
     文件        1131  2020-09-23 09:06  README.md
     文件       28313  2020-09-23 09:06  sdkconfig.defaults

评论

共有 条评论