Les cartes de développement ESP32 avec caméra deviennent populaires auprès de la communauté des fabricants. Il existe différents modèles de cartes caméra ESP32 avec différentes fonctionnalités. Chaque carte de développement de caméra ESP32 utilise différents GPIO pour se connecter à la caméra. Dans ce guide, nous vous montrerons la définition de broche à inclure dans votre code pour chaque carte.
Ce guide couvre l’affectation des broches/GPIO pour les cartes de développement de caméra ESP32 suivantes :
Pour une comparaison détaillée des différentes cartes caméra ESP32, lisez :
Affectation des broches ESP32-CAM AI-Thinker
L’image suivante montre le schéma de brochage de l’ESP32-CAM AI-Thinker.
Voici l’affectation des broches de la caméra OV2640 pour la carte ESP32-CAM AI-Thinker :
#define PWDN_GPIO_NUM 32
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 0
#define SIOD_GPIO_NUM 26
#define SIOC_GPIO_NUM 27
#define Y9_GPIO_NUM 35
#define Y8_GPIO_NUM 34
#define Y7_GPIO_NUM 39
#define Y6_GPIO_NUM 36
#define Y5_GPIO_NUM 21
#define Y4_GPIO_NUM 19
#define Y3_GPIO_NUM 18
#define Y2_GPIO_NUM 5
#define VSYNC_GPIO_NUM 25
#define HREF_GPIO_NUM 23
#define PCLK_GPIO_NUM 22
L’ESP32-CAM AI-Thinker est livré avec 10 GPIO exposés. Apprenez à utiliser ces GPIO avec ce guide de référence du brochage ESP32-CAM.
Passer en revue: ESP32-CAM avec caméra OV2640
Affectation des broches TTGO T-Journal
Affectation des broches pour la carte TTGO T-Journal.
#define PWDN_GPIO_NUM 32
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 27
#define SIOD_GPIO_NUM 25
#define SIOC_GPIO_NUM 23
#define Y9_GPIO_NUM 19
#define Y8_GPIO_NUM 36
#define Y7_GPIO_NUM 18
#define Y6_GPIO_NUM 39
#define Y5_GPIO_NUM 5
#define Y4_GPIO_NUM 34
#define Y3_GPIO_NUM 35
#define Y2_GPIO_NUM 17
#define VSYNC_GPIO_NUM 22
#define HREF_GPIO_NUM 26
#define PCLK_GPIO_NUM 21
Passer en revue: Carte de développement de caméra TTGO T-Journal ESP32
Affectation des broches du modèle A de la caméra M5
Il existe deux modèles similaires : M5-Camera Model A et M5-Camera Model B. Le modèle A ressemble à la figure suivante.
Affectation des broches pour la caméra M5 modèle A.
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM 15
#define XCLK_GPIO_NUM 27
#define SIOD_GPIO_NUM 25
#define SIOC_GPIO_NUM 23
#define Y9_GPIO_NUM 19
#define Y8_GPIO_NUM 36
#define Y7_GPIO_NUM 18
#define Y6_GPIO_NUM 39
#define Y5_GPIO_NUM 5
#define Y4_GPIO_NUM 34
#define Y3_GPIO_NUM 35
#define Y2_GPIO_NUM 32
#define VSYNC_GPIO_NUM 22
#define HREF_GPIO_NUM 26
#define PCLK_GPIO_NUM 21
Affectation des broches du modèle B de la caméra M5
La caméra M5-Camera Model B se présente comme suit :
Affectation des broches pour la caméra M5 modèle B.
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM 15
#define XCLK_GPIO_NUM 27
#define SIOD_GPIO_NUM 22
#define SIOC_GPIO_NUM 23
#define Y9_GPIO_NUM 19
#define Y8_GPIO_NUM 36
#define Y7_GPIO_NUM 18
#define Y6_GPIO_NUM 39
#define Y5_GPIO_NUM 5
#define Y4_GPIO_NUM 34
#define Y3_GPIO_NUM 35
#define Y2_GPIO_NUM 32
#define VSYNC_GPIO_NUM 25
#define HREF_GPIO_NUM 26
#define PCLK_GPIO_NUM 21
Affectation des broches de la caméra M5-Stack ESP32 (sans PSRAM)
Affectation des broches pour la caméra ESP32 M5-stack sans PSRAM.
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM 15
#define XCLK_GPIO_NUM 27
#define SIOD_GPIO_NUM 25
#define SIOC_GPIO_NUM 23
#define Y9_GPIO_NUM 19
#define Y8_GPIO_NUM 36
#define Y7_GPIO_NUM 18
#define Y6_GPIO_NUM 39
#define Y5_GPIO_NUM 5
#define Y4_GPIO_NUM 34
#define Y3_GPIO_NUM 35
#define Y2_GPIO_NUM 17
#define VSYNC_GPIO_NUM 22
#define HREF_GPIO_NUM 26
#define PCLK_GPIO_NUM 21
Affectation des broches ESP-EYE
Affectation des broches pour la caméra ESP-EYE.
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 4
#define SIOD_GPIO_NUM 18
#define SIOC_GPIO_NUM 23
#define Y9_GPIO_NUM 36
#define Y8_GPIO_NUM 37
#define Y7_GPIO_NUM 38
#define Y6_GPIO_NUM 39
#define Y5_GPIO_NUM 35
#define Y4_GPIO_NUM 14
#define Y3_GPIO_NUM 13
#define Y2_GPIO_NUM 34
#define VSYNC_GPIO_NUM 5
#define HREF_GPIO_NUM 27
#define PCLK_GPIO_NUM 25
Passer en revue: ESP-EYE : carte basée sur ESP32 pour l’IA
Affectation des broches TTGO T-Camera Plus
Affectation des broches pour la TTGO T-Camera Plus.
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 4
#define SIOD_GPIO_NUM 18
#define SIOC_GPIO_NUM 23
#define Y9_GPIO_NUM 36
#define Y8_GPIO_NUM 37
#define Y7_GPIO_NUM 38
#define Y6_GPIO_NUM 39
#define Y5_GPIO_NUM 35
#define Y4_GPIO_NUM 26
#define Y3_GPIO_NUM 13
#define Y2_GPIO_NUM 34
#define VSYNC_GPIO_NUM 5
#define HREF_GPIO_NUM 27
#define PCLK_GPIO_NUM 25
Passer en revue: Carte de développement TTGO T-Camera Plus ESP32
Caméra T TTGO avec affectation des broches du capteur PIR
Définition des broches pour la T-Camera avec capteur PIR (sans microphone et sans BME280) :
#define PWDN_GPIO_NUM -1
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 32
#define SIOD_GPIO_NUM 13
#define SIOC_GPIO_NUM 12
#define Y9_GPIO_NUM 39
#define Y8_GPIO_NUM 36
#define Y7_GPIO_NUM 23
#define Y6_GPIO_NUM 18
#define Y5_GPIO_NUM 15
#define Y4_GPIO_NUM 4
#define Y3_GPIO_NUM 14
#define Y2_GPIO_NUM 5
#define VSYNC_GPIO_NUM 27
#define HREF_GPIO_NUM 25
#define PCLK_GPIO_NUM 19
Emballer
Il est très important d’avoir la bonne définition de broche pour votre carte de caméra ESP32. Sinon, votre code ne fonctionnera pas ou votre carte n’initialisera pas la caméra.
Nous avons plusieurs tutoriels pour l’ESP32-CAM qui peuvent également être compatibles avec d’autres cartes de caméra ESP32 tant que vous utilisez la bonne définition de broche dans votre code.