]> vault307.fbx.one Git - esp32Cam.git/blob - config.py
esp32Camera webserver
[esp32Cam.git] / config.py
1
2 #-camera configuration int keys ** DONT EDIT **---------------
3 PIN_PWDN = const(0) # power-down
4 PIN_RESET = const(1) # reset
5 PIN_XCLK = const(2)
6 PIN_SIOD = const(3) # SDA
7 PIN_SIOC = const(4) # SCL
8
9 PIN_D7 = const(5)
10 PIN_D6 = const(6)
11 PIN_D5 = const(7)
12 PIN_D4 = const(8)
13 PIN_D3 = const(9)
14 PIN_D2 = const(10)
15 PIN_D1 = const(11)
16 PIN_D0 = const(12)
17 PIN_VSYNC = const(13)
18 PIN_HREF = const(14)
19 PIN_PCLK = const(15)
20
21 XCLK_MHZ = const(16) # camera machine clock
22 PIXFORMAT = const(17) # pixel format
23 FRAMESIZE = const(18) # framesize
24 JPEG_QUALITY= const(19)
25 FB_COUNT = const(20) # framebuffer count > 1 continuous mode (JPEG only)
26
27 #-------------------------------------------------------------
28
29 # OV2640 Boards configuration below (can edit - add your board)
30
31 # AI-Thinker esp32-cam board
32 ai_thinker = {PIN_PWDN:32,
33 PIN_RESET:-1,
34 PIN_XCLK:0,
35 PIN_SIOD:26,
36 PIN_SIOC:27,
37 PIN_D7:35,
38 PIN_D6:34,
39 PIN_D5:39,
40 PIN_D4:36,
41 PIN_D3:21,
42 PIN_D2:19,
43 PIN_D1:18,
44 PIN_D0:5,
45 PIN_VSYNC:25,
46 PIN_HREF:23,
47 PIN_PCLK:22,
48 XCLK_MHZ:16,
49 PIXFORMAT:5,
50 FRAMESIZE:10,
51 JPEG_QUALITY:10,
52 FB_COUNT:1,
53 }
54
55 # New 2022 esp32vrover dev
56 esp_eye = {PIN_PWDN:-1,
57 PIN_RESET:-1,
58 PIN_XCLK:4,
59 PIN_SIOD:18,
60 PIN_SIOC:23,
61 PIN_D7:36,
62 PIN_D6:37,
63 PIN_D5:38,
64 PIN_D4:39,
65 PIN_D3:35,
66 PIN_D2:14,
67 PIN_D1:13,
68 PIN_D0:34,
69 PIN_VSYNC:5,
70 PIN_HREF:27,
71 PIN_PCLK:25,
72 XCLK_MHZ:16,
73 PIXFORMAT:5,
74 FRAMESIZE:10,
75 JPEG_QUALITY:10,
76 FB_COUNT:1,
77 }
78
79 # esp32 wrover dev
80 wrover_dev = {PIN_PWDN:32,
81 PIN_RESET:-1,
82 PIN_XCLK:21,
83 PIN_SIOD:26,
84 PIN_SIOC:27,
85 PIN_D7:35,
86 PIN_D6:34,
87 PIN_D5:39,
88 PIN_D4:36,
89 PIN_D3:19,
90 PIN_D2:18,
91 PIN_D1:5,
92 PIN_D0:4,
93 PIN_VSYNC:25,
94 PIN_HREF:23,
95 PIN_PCLK:22,
96 XCLK_MHZ:12,
97 PIXFORMAT:5,
98 FRAMESIZE:10,
99 JPEG_QUALITY:10,
100 FB_COUNT:1,
101 }
102
103 # Test
104 wrover_test = {PIN_PWDN:-1,
105 PIN_RESET:-1,
106 PIN_XCLK:21,
107 PIN_SIOD:26,
108 PIN_SIOC:27,
109 PIN_D7:35,
110 PIN_D6:34,
111 PIN_D5:39,
112 PIN_D4:36,
113 PIN_D3:19,
114 PIN_D2:18,
115 PIN_D1:5,
116 PIN_D0:4,
117 PIN_VSYNC:25,
118 PIN_HREF:23,
119 PIN_PCLK:22,
120 XCLK_MHZ:12,
121 PIXFORMAT:5,
122 FRAMESIZE:10,
123 JPEG_QUALITY:10,
124 FB_COUNT:1,
125 }
126
127 # Red Board (has internal clock for camera set at 12Mhz)
128 red_board = {PIN_PWDN:32, #
129 PIN_RESET:-1,
130 PIN_XCLK:-1, # internal sensor clock
131 PIN_SIOD:26,
132 PIN_SIOC:27,
133 PIN_D7:35,
134 PIN_D6:34,
135 PIN_D5:39,
136 PIN_D4:36,
137 PIN_D3:21,
138 PIN_D2:19,
139 PIN_D1:18,
140 PIN_D0:5,
141 PIN_VSYNC:25,
142 PIN_HREF:23,
143 PIN_PCLK:22,
144 XCLK_MHZ:12, # the board has 12Mhz intrenal clock (MUST set to 12)
145 PIXFORMAT:5,
146 FRAMESIZE:10,
147 JPEG_QUALITY:10,
148 FB_COUNT:1,
149 }
150
151 # XIAO ESP32S3 Sense Camera
152 xiao_s3_sense = {PIN_PWDN:-1,
153 PIN_RESET:-1,
154 PIN_XCLK:10,
155 PIN_SIOD:40,
156 PIN_SIOC:39,
157 PIN_D7:48,
158 PIN_D6:11,
159 PIN_D5:12,
160 PIN_D4:14,
161 PIN_D3:16,
162 PIN_D2:18,
163 PIN_D1:17,
164 PIN_D0:15,
165 PIN_VSYNC:38,
166 PIN_HREF:47,
167 PIN_PCLK:13,
168 XCLK_MHZ:14,
169 PIXFORMAT:5,
170 FRAMESIZE:10,
171 JPEG_QUALITY:12,
172 FB_COUNT:1,
173 }
174
175 # LILYGO T-Camera esp32s3 V1.6
176 lilygo_t_camera = {PIN_PWDN:-1,
177 PIN_RESET:39,
178 PIN_XCLK:38,
179 PIN_SIOD:5,
180 PIN_SIOC:4,
181 PIN_D7:9,
182 PIN_D6:10,
183 PIN_D5:11,
184 PIN_D4:13,
185 PIN_D3:21,
186 PIN_D2:48,
187 PIN_D1:47,
188 PIN_D0:14,
189 PIN_VSYNC:8,
190 PIN_HREF:18,
191 PIN_PCLK:12,
192 XCLK_MHZ:14,
193 PIXFORMAT:5,
194 FRAMESIZE:10,
195 JPEG_QUALITY:12,
196 FB_COUNT:2,
197 }
198
199 # FREENOVE esp32s3 WROOM FNK0085 A1B0
200 freenove_fnk0085 = {PIN_PWDN:-1,
201 PIN_RESET:-1,
202 PIN_XCLK:15,
203 PIN_SIOD:4,
204 PIN_SIOC:5,
205 PIN_D7:16,
206 PIN_D6:17,
207 PIN_D5:18,
208 PIN_D4:12,
209 PIN_D3:10,
210 PIN_D2:8,
211 PIN_D1:9,
212 PIN_D0:11,
213 PIN_VSYNC:6,
214 PIN_HREF:7,
215 PIN_PCLK:13,
216 XCLK_MHZ:14,
217 PIXFORMAT:5,
218 FRAMESIZE:10,
219 JPEG_QUALITY:12,
220 FB_COUNT:2,
221 }
222
223 def configure(cam, config):
224 for key, val in config.items():
225 # print(key, val)
226 cam.conf(key, val)