Skip to content

Commit

Permalink
Bug in camera pins corrected and dome improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
cnadler86 committed Oct 11, 2024
1 parent bd32cad commit 9a3687d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
36 changes: 18 additions & 18 deletions src/camera_pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define MICROPY_CAMERA_PIN_PWDN -1
#define MICROPY_CAMERA_PIN_RESET -1
#define MICROPY_CAMERA_PIN_XCLK 21
#define MICROPY_CAMERA_PIN_SIODM 26
#define MICROPY_CAMERA_PIN_SIOD 26
#define MICROPY_CAMERA_PIN_SIOC 27

#define MICROPY_CAMERA_PIN_D7 35
Expand All @@ -22,7 +22,7 @@
#define MICROPY_CAMERA_PIN_PWDN -1
#define MICROPY_CAMERA_PIN_RESET -1
#define MICROPY_CAMERA_PIN_XCLK 4
#define MICROPY_CAMERA_PIN_SIODM 18
#define MICROPY_CAMERA_PIN_SIOD 18
#define MICROPY_CAMERA_PIN_SIOC 23

#define MICROPY_CAMERA_PIN_D7 36
Expand All @@ -43,7 +43,7 @@
#define MICROPY_CAMERA_PIN_PWDN -1
#define MICROPY_CAMERA_PIN_RESET 15
#define MICROPY_CAMERA_PIN_XCLK 27
#define MICROPY_CAMERA_PIN_SIODM 25
#define MICROPY_CAMERA_PIN_SIOD 25
#define MICROPY_CAMERA_PIN_SIOC 23

#define MICROPY_CAMERA_PIN_D7 19
Expand All @@ -62,7 +62,7 @@
#define MICROPY_CAMERA_PIN_PWDN -1
#define MICROPY_CAMERA_PIN_RESET 15
#define MICROPY_CAMERA_PIN_XCLK 27
#define MICROPY_CAMERA_PIN_SIODM 22
#define MICROPY_CAMERA_PIN_SIOD 22
#define MICROPY_CAMERA_PIN_SIOC 23

#define MICROPY_CAMERA_PIN_D7 19
Expand All @@ -81,7 +81,7 @@
#define MICROPY_CAMERA_PIN_PWDN -1
#define MICROPY_CAMERA_PIN_RESET 15
#define MICROPY_CAMERA_PIN_XCLK 27
#define MICROPY_CAMERA_PIN_SIODM 22
#define MICROPY_CAMERA_PIN_SIOD 22
#define MICROPY_CAMERA_PIN_SIOC 23

#define MICROPY_CAMERA_PIN_D7 19
Expand All @@ -100,7 +100,7 @@
#define MICROPY_CAMERA_PIN_PWDN -1
#define MICROPY_CAMERA_PIN_RESET 15
#define MICROPY_CAMERA_PIN_XCLK 27
#define MICROPY_CAMERA_PIN_SIODM 25
#define MICROPY_CAMERA_PIN_SIOD 25
#define MICROPY_CAMERA_PIN_SIOC 23

#define MICROPY_CAMERA_PIN_D7 19
Expand All @@ -119,7 +119,7 @@
#define MICROPY_CAMERA_PIN_PWDN -1
#define MICROPY_CAMERA_PIN_RESET 15
#define MICROPY_CAMERA_PIN_XCLK 27
#define MICROPY_CAMERA_PIN_SIODM 25
#define MICROPY_CAMERA_PIN_SIOD 25
#define MICROPY_CAMERA_PIN_SIOC 23

#define MICROPY_CAMERA_PIN_D7 19
Expand All @@ -138,7 +138,7 @@
#define MICROPY_CAMERA_PIN_PWDN -1
#define MICROPY_CAMERA_PIN_RESET 21
#define MICROPY_CAMERA_PIN_XCLK 11
#define MICROPY_CAMERA_PIN_SIODM 17
#define MICROPY_CAMERA_PIN_SIOD 17
#define MICROPY_CAMERA_PIN_SIOC 41

#define MICROPY_CAMERA_PIN_D7 13
Expand All @@ -157,7 +157,7 @@
#define MICROPY_CAMERA_PIN_PWDN 32
#define MICROPY_CAMERA_PIN_RESET -1
#define MICROPY_CAMERA_PIN_XCLK 0
#define MICROPY_CAMERA_PIN_SIODM 26
#define MICROPY_CAMERA_PIN_SIOD 26
#define MICROPY_CAMERA_PIN_SIOC 27

#define MICROPY_CAMERA_PIN_D7 35
Expand All @@ -176,7 +176,7 @@
#define MICROPY_CAMERA_PIN_PWDN 0
#define MICROPY_CAMERA_PIN_RESET 15
#define MICROPY_CAMERA_PIN_XCLK 27
#define MICROPY_CAMERA_PIN_SIODM 25
#define MICROPY_CAMERA_PIN_SIOD 25
#define MICROPY_CAMERA_PIN_SIOC 23

#define MICROPY_CAMERA_PIN_D7 19
Expand All @@ -195,7 +195,7 @@
#define MICROPY_CAMERA_PIN_PWDN -1
#define MICROPY_CAMERA_PIN_RESET -1
#define MICROPY_CAMERA_PIN_XCLK 10
#define MICROPY_CAMERA_PIN_SIODM 40
#define MICROPY_CAMERA_PIN_SIOD 40
#define MICROPY_CAMERA_PIN_SIOC 39

#define MICROPY_CAMERA_PIN_D7 48
Expand All @@ -216,7 +216,7 @@
#define MICROPY_CAMERA_PIN_PWDN 32
#define MICROPY_CAMERA_PIN_RESET 33
#define MICROPY_CAMERA_PIN_XCLK 4
#define MICROPY_CAMERA_PIN_SIODM 18
#define MICROPY_CAMERA_PIN_SIOD 18
#define MICROPY_CAMERA_PIN_SIOC 23

#define MICROPY_CAMERA_PIN_D7 36
Expand All @@ -243,7 +243,7 @@
#define MICROPY_CAMERA_PIN_PWDN -1
#define MICROPY_CAMERA_PIN_RESET -1
#define MICROPY_CAMERA_PIN_XCLK 40
#define MICROPY_CAMERA_PIN_SIODM 17
#define MICROPY_CAMERA_PIN_SIOD 17
#define MICROPY_CAMERA_PIN_SIOC 18

#define MICROPY_CAMERA_PIN_D7 39
Expand All @@ -262,7 +262,7 @@
#define MICROPY_CAMERA_PIN_PWDN -1
#define MICROPY_CAMERA_PIN_RESET -1
#define MICROPY_CAMERA_PIN_XCLK 15
#define MICROPY_CAMERA_PIN_SIODM 4
#define MICROPY_CAMERA_PIN_SIOD 4
#define MICROPY_CAMERA_PIN_SIOC 5

#define MICROPY_CAMERA_PIN_D0 11
Expand All @@ -281,7 +281,7 @@
#define MICROPY_CAMERA_PIN_PWDN -1
#define MICROPY_CAMERA_PIN_RESET -1
#define MICROPY_CAMERA_PIN_XCLK 45
#define MICROPY_CAMERA_PIN_SIODM 1
#define MICROPY_CAMERA_PIN_SIOD 1
#define MICROPY_CAMERA_PIN_SIOC 2

#define MICROPY_CAMERA_PIN_D7 48
Expand All @@ -300,7 +300,7 @@
#define MICROPY_CAMERA_PIN_PWDN -1
#define MICROPY_CAMERA_PIN_RESET -1
#define MICROPY_CAMERA_PIN_XCLK 4
#define MICROPY_CAMERA_PIN_SIODM 18
#define MICROPY_CAMERA_PIN_SIOD 18
#define MICROPY_CAMERA_PIN_SIOC 23

#define MICROPY_CAMERA_PIN_D7 36
Expand All @@ -320,7 +320,7 @@
#define MICROPY_CAMERA_PIN_PWDN -1
#define MICROPY_CAMERA_PIN_RESET -1
#define MICROPY_CAMERA_PIN_XCLK 10
#define MICROPY_CAMERA_PIN_SIODM 21
#define MICROPY_CAMERA_PIN_SIOD 21
#define MICROPY_CAMERA_PIN_SIOC 14

#define MICROPY_CAMERA_PIN_D7 11
Expand All @@ -339,7 +339,7 @@
#define MICROPY_CAMERA_PIN_PWDN -1
#define MICROPY_CAMERA_PIN_RESET -1
#define MICROPY_CAMERA_PIN_XCLK 1 // Can use
#define MICROPY_CAMERA_PIN_SIODM 8 // Can use other i2c SDA pin, set this to -1 | If not using i2c set to 8 or 47
#define MICROPY_CAMERA_PIN_SIOD 8 // Can use other i2c SDA pin, set this to -1 | If not using i2c set to 8 or 47
#define MICROPY_CAMERA_PIN_SIOC 9 // Can use other i2c SCL pin, set this to -1 | If not using i2c set to 9 or 21

#define MICROPY_CAMERA_PIN_D7 3 //D7
Expand Down
14 changes: 8 additions & 6 deletions src/modcamera.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@
#include "sensor.h"
#include "camera_pins.h"

#if defined(MICROPY_CAMERA_PIN_SIOD) && defined(MICROPY_CAMERA_PIN_SIOC) && defined(MICROPY_CAMERA_PIN_D0) && defined(MICROPY_CAMERA_PIN_D1) && defined(MICROPY_CAMERA_PIN_D2) && \
defined(MICROPY_CAMERA_PIN_D3) && defined(MICROPY_CAMERA_PIN_D4) && defined(MICROPY_CAMERA_PIN_D5) && defined(MICROPY_CAMERA_PIN_D6) && defined(MICROPY_CAMERA_PIN_D7) && \
defined(MICROPY_CAMERA_PIN_PCLK) && defined(MICROPY_CAMERA_PIN_VSYNC) && defined(MICROPY_CAMERA_PIN_HREF) && defined(MICROPY_CAMERA_PIN_XCLK)
#if defined (MICROPY_CAMERA_PIN_SIOD) && defined (MICROPY_CAMERA_PIN_SIOC) && defined (MICROPY_CAMERA_PIN_D0) && defined (MICROPY_CAMERA_PIN_D1) && defined (MICROPY_CAMERA_PIN_D2) && \
defined (MICROPY_CAMERA_PIN_D3) && defined (MICROPY_CAMERA_PIN_D4) && defined (MICROPY_CAMERA_PIN_D5) && defined (MICROPY_CAMERA_PIN_D6) && defined (MICROPY_CAMERA_PIN_D7) && \
defined (MICROPY_CAMERA_PIN_PCLK) && defined (MICROPY_CAMERA_PIN_VSYNC) && defined (MICROPY_CAMERA_PIN_HREF) && defined (MICROPY_CAMERA_PIN_XCLK)
#define MICROPY_CAMERA_ALL_REQ_PINS_DEFINED (1)
#endif

Expand All @@ -58,7 +58,7 @@ defined(MICROPY_CAMERA_PIN_PCLK) && defined(MICROPY_CAMERA_PIN_VSYNC) && defined
#define MICROPY_CAMERA_PIN_RESET (-1)
#endif

#if !defined(MICROPY_CAMERA_XCLK_FREQ) && defined(CONFIG_IDF_TARGET_ESP32S3)
#if !defined (MICROPY_CAMERA_XCLK_FREQ) && defined (CONFIG_IDF_TARGET_ESP32S3)
#define MICROPY_CAMERA_XCLK_FREQ (20)
#elif !defined(MICROPY_CAMERA_XCLK_FREQ)
#define MICROPY_CAMERA_XCLK_FREQ (10)
Expand All @@ -76,8 +76,10 @@ defined(MICROPY_CAMERA_PIN_PCLK) && defined(MICROPY_CAMERA_PIN_VSYNC) && defined
#define MICROPY_CAMERA_GRAB_MODE CAMERA_GRAB_WHEN_EMPTY
#endif

#ifndef MICROPY_CAMERA_FB_COUNT
#define MICROPY_CAMERA_FB_COUNT (1)
#if !defined (MICROPY_CAMERA_FB_COUNT) && defined (CONFIG_IDF_TARGET_ESP32S3)
#define MICROPY_CAMERA_XCLK_FREQ (2)
#elif !defined(MICROPY_CAMERA_FB_COUNT)
#define MICROPY_CAMERA_XCLK_FREQ (1)
#endif

#ifndef MICROPY_CAMERA_JPEG_QUALITY
Expand Down

0 comments on commit 9a3687d

Please sign in to comment.