Board-dat/SCM/SCM1030-dat/SCM1030-dat.md
... ...
@@ -49,6 +49,7 @@ ESP-32CAM is packaged in DIP and can be directly plugged into the backplane for
49 49
pin define
50 50
51 51
#elif defined(CAMERA_MODEL_AI_THINKER)
52
+
52 53
#define PWDN_GPIO_NUM 32
53 54
#define RESET_GPIO_NUM -1
54 55
#define XCLK_GPIO_NUM 0
... ...
@@ -87,6 +88,7 @@ pin define
87 88
88 89
- [[OV2640-dat]]
89 90
91
+module pin to board pin
90 92
91 93
| L_Pin | custom | M_Pin | custom | R_Pin | custom |
92 94
|-------|---------|-------|---------|-------|----------------|
... ...
@@ -130,6 +132,11 @@ LEDs - [[LED-dat]]
130 132
131 133
to get free pins, remove card in [[SD-dat]]
132 134
135
+programming connect 5V, GND, RXD0, TXD0
136
+
137
+jumper set IO0 + GND into flashing boot mode
138
+
139
+
133 140
134 141
## Demo code
135 142
... ...
@@ -159,6 +166,15 @@ GPIO PINS: (from alanesq/esp32cam-demo) - [[sd-dat]]
159 166
- 4 has the illumination/flash led on it - led could be removed and use as output?
160 167
- 33 onboard led - use as output?
161 168
169
+## chip version
170
+
171
+- esptool v5.0.1
172
+- Connected to ESP32 on COM6:
173
+- Chip type: ESP32-D0WDQ6 (revision v1.0)
174
+- Features: Wi-Fi, BT, Dual Core + LP Core, 240MHz, Vref calibration in eFuse, Coding Scheme None
175
+- Crystal frequency: 40MHz
176
+- MAC: 10:52:1c:69:53:a8
177
+
162 178
163 179
164 180
## Board Issues == V1701
... ...
@@ -166,6 +182,8 @@ GPIO PINS: (from alanesq/esp32cam-demo) - [[sd-dat]]
166 182
- For board version v1701, note do not connect pin "GND/R" aka GND3 to ground, otherwise it won't boot
167 183
- [refer for more information here. ](https://esp32.com/viewtopic.php?f=12&t=29647&sid=fed114d9e4f87cf6634c7ad145a5d8df&start=10)
168 184
185
+
186
+
169 187
## ref
170 188
171 189
- default factory firmware demo [[ai-thinker_ESP32-CAM_DIO_V1.0_20180825.bin]]
SDK-dat/microPython-dat/ESP32_GENERIC-20250415-v1.25.0.bin
... ...
Binary files /dev/null and b/SDK-dat/microPython-dat/ESP32_GENERIC-20250415-v1.25.0.bin differ
SDK-dat/microPython-dat/MP-ESP32-dat/MP-ESP32-dat.md
... ...
@@ -2,8 +2,22 @@
2 2
# MP-ESP32-dat
3 3
4 4
5
+## For ESP32
5 6
6
-## Microptyhon for ESP32-S3
7
+
8
+https://micropython.org/resources/firmware/ESP32_GENERIC-20250415-v1.25.0.bin
9
+
10
+### boot.esp32: PRO CPU has been reset by WDT.
11
+
12
+ESP32D0WDQ6 (revision 1) boards
13
+
14
+https://github.com/orgs/micropython/discussions/10521
15
+
16
+
17
+solder a 10UF capacitor between EN and GND pins to prevent the watchdog timer from resetting the board.
18
+
19
+
20
+## For ESP32-S3
7 21
8 22
- [[ESP32-S3-dat]]
9 23
SDK-dat/microPython-dat/ampy-dat.md
... ...
@@ -0,0 +1,44 @@
1
+
2
+# ampy-dat.md
3
+
4
+- pip install adafruit-ampy
5
+- https://pypi.org/project/adafruit-ampy/
6
+
7
+
8
+put
9
+
10
+ ampy -p COM6 put boot.py
11
+ ampy -p COM6 put main.py
12
+ ampy -p COM6 put ov2640_constants.py
13
+ ampy -p COM6 put ov2640_hires_constants.py
14
+ ampy -p COM6 put ov2640_lores_constants.py
15
+ ampy -p COM6 put ov2640.py
16
+
17
+ ampy -p COM6 put boot.py
18
+ ampy -p COM6 put main.py
19
+ ampy -p COM6 put microWebSrv.py
20
+ ampy -p COM6 put webcam.py
21
+ ampy -p COM6 put webserver.py
22
+
23
+ls
24
+
25
+ E:\git-clone-dl\micropython-ov2640>ampy -p COM6 ls
26
+ /boot.py
27
+ /main.py
28
+ /ov2640.py
29
+ /ov2640_constants.py
30
+ /ov2640_hires_constants.py
31
+ /ov2640_lores_constants.py
32
+
33
+rm
34
+
35
+ ampy -p COM6 rm boot.py
36
+ ampy -p COM6 rm main.py
37
+ ampy -p COM6 rm ov2640_constants.py
38
+ ampy -p COM6 rm ov2640_hires_constants.py
39
+ ampy -p COM6 rm ov2640_lores_constants.py
40
+ ampy -p COM6 rm ov2640.py
41
+
42
+get
43
+
44
+ ampy -p COM6 get webserver.py
... ...
\ No newline at end of file
SDK-dat/microPython-dat/boot-esp32.py
... ...
@@ -0,0 +1,27 @@
1
+
2
+
3
+# boot.py — run once on boot before main.py
4
+import machine
5
+import esp
6
+import network
7
+
8
+# Optional: disable debug output
9
+esp.osdebug(None)
10
+
11
+# Optional: turn off REPL on UART0
12
+# import uos
13
+# uos.dupterm(None, 1)
14
+
15
+# Connect to Wi-Fi
16
+sta = network.WLAN(network.STA_IF)
17
+sta.active(True)
18
+sta.connect('your-SSID', 'your-PASSWORD')
19
+
20
+# Wait for connection
21
+while not sta.isconnected():
22
+ pass
23
+
24
+print('Connected to Wi-Fi:', sta.ifconfig())
25
+
26
+
27
+
SDK-dat/microPython-dat/boot.py
... ...
@@ -0,0 +1,4 @@
1
+
2
+print("Running boot.py...")
3
+
4
+
SDK-dat/microPython-dat/main.py
... ...
@@ -0,0 +1,3 @@
1
+
2
+
3
+print("Running main.py...")
SDK-dat/microPython-dat/micropython-dat.md
... ...
@@ -5,6 +5,11 @@
5 5
- [[MP-ESP32-dat]] - [[MP-STM32-dat]]
6 6
7 7
8
+Feature: Audio Codec, BLE, Battery Charging, CAN, Camera, DAC, Display, Dual-core, Environment Sensor, Ethernet, External Flash, External RAM, Feather, IMU, JST-PH, JST-SH, LoRa, Microphone, PoE, RGB LED, SDCard, Secure Element, USB, USB-C, WiFi, microSD, mikroBUS
9
+
10
+
11
+
12
+MCU: AE722F80F55D5XX, RA6M5, cc3200, esp32, esp32c3, esp32c6, esp32s2, esp32s3, esp8266, mimxrt, nrf51, nrf52, nrf91, ra4m1, ra4w1, ra6m1, ra6m2, ra6m5, rp2040, rp2350, samd21, samd51, stm32f0, stm32f4, stm32f411, stm32f7, stm32g0, stm32g4, stm32h5, stm32h7, stm32l0, stm32l1, stm32l4, stm32wb, stm32wl
8 13
9 14
## About micropython:
10 15
... ...
@@ -38,8 +43,97 @@ Open the USB flash drive, edit the main.py file, click Save, and reset the MCU t
38 43
39 44
- [[camera-SDK-dat]]
40 45
46
+## relevant other useful tools
47
+
48
+- [[ampy-dat]]
49
+
50
+pip install mpremote
51
+
52
+mpremote connect COM6 fs ls
53
+
54
+mpremote connect COM6 fs cp 2640-1.py :
55
+mpremote connect COM6 fs cp :capture.jpg .
56
+
57
+mpremote connect COM6 fs rm :capture.jpg
58
+
59
+mpremote connect COM6
60
+
61
+mpremote connect COM6 run 2640-1.py
62
+
63
+ mpremote connect COM6
64
+ Connected to MicroPython at COM6
65
+ Use Ctrl-] or Ctrl-x to exit this shell
66
+
67
+capture script run
68
+
69
+ import test2
70
+ >>> print(os.listdir())
71
+ ['boot.py', 'capture.jpg', 'test2.py']
72
+ >>>
73
+
74
+rename a file == mpremote connect COM6 fs mv :2640-2.py :main.py
75
+
76
+ mpremote connect COM6 fs cp :2640-2.py :main.py
77
+
78
+reboot == mpremote connect COM6 reset
79
+
80
+
81
+## flash
82
+
83
+ sudo esptool.py --port /dev/ttyUSB0 erase_flash
84
+ sudo esptool.py --port /dev/ttyUSB0 --baud 460800 write-flash --flash-size=detect 0 ~/Downloads/esp8266
85
+
86
+ esptool --port COM6 erase_flash
87
+
88
+esp8266
89
+ esptool --port COM6 --baud 460800 write-flash --flash-size=detect 0 ~/Downloads/esp8266
90
+
91
+esp32
92
+
93
+ esptool --port COM6 --baud 460800 write-flash 0x1000 ESP32_GENERIC-20250415-v1.25.0.bin
94
+
95
+and after flash
96
+
97
+ rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
98
+ configsip: 0, SPIWP:0xee
99
+ clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
100
+ mode:DIO, clock div:2
101
+ load:0x3fff0030,len:4892
102
+ ho 0 tail 12 room 4
103
+ load:0x40078000,len:14896
104
+ load:0x40080400,len:4
105
+ load:0x40080404,len:3372
106
+ entry 0x400805b0
107
+ Performing initial setup
108
+ MicroPython v1.25.0 on 2025-04-15; Generic ESP32 module with ESP32
109
+ Type "help()" for more information.
110
+ >>>
111
+
112
+
113
+
114
+## basic operations
115
+
116
+List Files in Current Directory
117
+
118
+ import os
119
+
120
+ print(os.listdir())
121
+
122
+
123
+## Typical Boot Flow on ESP32
124
+
125
+ Power On / Reset
126
+ ↓
127
+ Run boot.py
128
+ ↓
129
+ Run main.py
130
+
131
+
132
+
41 133
## ref
42 134
43 135
- [[script-based-SDK]]
44 136
45
-- [[SDK-dat]]
... ...
\ No newline at end of file
0
+- [[SDK-dat]]
1
+
2
+- [[SERIAL-DAT]]
... ...
\ No newline at end of file
Tech-dat/Interface-dat/Serial-dat/Serial-monitor-dat/Serial-monitor-dat.md
... ...
@@ -3,6 +3,14 @@
3 3
4 4
- [[putty-dat]] - [[SSCOM-dat]]
5 5
6
+screen, putty, minicom, or TeraTerm
7
+
8
+
9
+Serial Monitor
10
+
11
+https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-serial-monitor
12
+
13
+toggle terminal mode
6 14
7 15
8 16
## demo test for esp32-C2
Tech-dat/sensor-camera-dat/camera-SDK-dat/OV2640-lemariva-dat/2640-1.py
... ...
@@ -0,0 +1,34 @@
1
+import camera
2
+import machine
3
+import time
4
+
5
+# Initialize IO4 (GPIO4) as output
6
+led = machine.Pin(4, machine.Pin.OUT)
7
+
8
+camera.init(0, format=camera.JPEG, fb_location=camera.PSRAM, xclk_freq=camera.XCLK_20MHz)
9
+
10
+while True:
11
+ # Blink IO4 while capturing
12
+ for _ in range(2):
13
+ led.value(1)
14
+ time.sleep(0.1)
15
+ led.value(0)
16
+ time.sleep(0.1)
17
+
18
+ machine.idle() # Yield to system
19
+ buf = camera.capture()
20
+ machine.idle() # Yield to system
21
+
22
+ with open('capture.jpg', 'wb') as f:
23
+ f.write(buf)
24
+
25
+ machine.idle() # Yield to system
26
+
27
+ # Sleep in small intervals, yielding to system
28
+ for _ in range(100):
29
+ time.sleep(0.1)
30
+ machine.idle()
31
+
32
+
33
+
34
+
Tech-dat/sensor-camera-dat/camera-SDK-dat/OV2640-lemariva-dat/2640-2.py
... ...
@@ -0,0 +1,49 @@
1
+
2
+import camera
3
+import machine
4
+import time
5
+import gc
6
+
7
+# Initialize IO4 (GPIO4) as output
8
+led = machine.Pin(4, machine.Pin.OUT)
9
+# Initialize IO3 (GPIO3) as input trigger
10
+trigger = machine.Pin(3, machine.Pin.IN, machine.Pin.PULL_DOWN)
11
+
12
+# Flag to indicate capture request
13
+capture_requested = False
14
+
15
+def trigger_handler(pin):
16
+ global capture_requested
17
+ capture_requested = True
18
+
19
+# Set up interrupt on rising edge of IO3
20
+trigger.irq(trigger=machine.Pin.IRQ_RISING, handler=trigger_handler)
21
+
22
+camera.init(0, format=camera.JPEG, fb_location=camera.PSRAM, xclk_freq=camera.XCLK_20MHz)
23
+
24
+while True:
25
+ if capture_requested:
26
+ capture_requested = False
27
+
28
+ # Blink IO4 while capturing
29
+ for _ in range(2):
30
+ led.value(1)
31
+ time.sleep(0.1)
32
+ led.value(0)
33
+ time.sleep(0.1)
34
+
35
+ buf = camera.capture()
36
+
37
+ with open('capture.jpg', 'wb') as f:
38
+ f.write(buf)
39
+
40
+ # Clean up memory
41
+ del buf
42
+ gc.collect()
43
+
44
+ # Long sleep since we're using interrupts
45
+ time.sleep(0.1)
46
+
47
+
48
+
49
+
Tech-dat/sensor-camera-dat/camera-SDK-dat/OV2640-lemariva-dat/OV2640-lemariva-dat.md
... ...
@@ -0,0 +1,46 @@
1
+
2
+# OV2640-lemariva-dat.md
3
+
4
+
5
+## for ESP1000 - ESP32-CAM
6
+
7
+- [[2640-2.py]] using IO3@high to detect and capcture image exmaple
8
+
9
+
10
+## original code
11
+
12
+https://github.com/lemariva/micropython-camera-driver
13
+https://github.com/lemariva/upyCam
14
+https://github.com/lemariva/upyCam/tree/timelapse-camera
15
+
16
+flash camera driver firmware
17
+
18
+ esptool --port COM6 --baud 460800 write-flash 0x1000 micropython_camera_feeeb5ea3_esp32_idf4_4.bin
19
+
20
+run for [[SCM1030-dat]] - ESP32-CAM
21
+
22
+ import camera
23
+ camera.init(0, format=camera.JPEG, fb_location=camera.PSRAM, xclk_freq=camera.XCLK_20MHz)
24
+ buf = camera.capture()
25
+
26
+![](capture0724.jpg)
27
+
28
+full code to capture a single image
29
+
30
+ import camera
31
+
32
+ camera.init(0, format=camera.JPEG, fb_location=camera.PSRAM, xclk_freq=camera.XCLK_20MHz)
33
+
34
+ buf = camera.capture()
35
+
36
+ with open('capture.jpg', 'wb') as f:
37
+ f.write(buf)
38
+
39
+- [[ESP1000-dat]]
40
+
41
+### lemariva/upyCam
42
+
43
+- config file config.py.example to config.py
44
+
45
+
46
+
Tech-dat/sensor-camera-dat/camera-SDK-dat/OV2640-lemariva-dat/capture0724.jpg
... ...
Binary files /dev/null and b/Tech-dat/sensor-camera-dat/camera-SDK-dat/OV2640-lemariva-dat/capture0724.jpg differ
Tech-dat/sensor-camera-dat/camera-SDK-dat/camera-SDK-dat.md
... ...
@@ -1,6 +1,13 @@
1 1
2 2
# camera-SDK-dat
3 3
4
+- [[ESP1000-dat]] - [[SCM1030-dat]]
5
+
6
+- [[camera-dat]]
7
+
8
+[[micropython-dat]] - [[script-based-SDK]]
9
+
10
+
4 11
## repro
5 12
6 13
- https://github.com/alanesq/esp32cam-demo
... ...
@@ -12,13 +19,22 @@
12 19
- https://github.com/donny681/ESP32_CAMERA_QR
13 20
- https://github.com/ArduCAM/Arduino
14 21
22
+## OV2640
23
+
24
+- [[OV2640-lemariva-dat]]
25
+
26
+
27
+
28
+
29
+
30
+
31
+### namato/micropython-ov2640 == only support SPI OV2640 camera
15 32
16
-[[micropython-dat]] - [[script-based-SDK]]
17 33
18 34
- https://github.com/namato/micropython-ov2640
19 35
20 36
git clone https://github.com/namato/micropython-ov2640
21
- cd micropython-ov2640
37
+![OV2640-lemariva-dat/capture0724.jpg](OV2640-lemariva-dat/capture0724.jpg)640
22 38
sudo ampy -p /dev/ttyUSB0 put boot.py
23 39
sudo ampy -p /dev/ttyUSB0 put main.py
24 40
sudo ampy -p /dev/ttyUSB0 put ov2640_constants.py
... ...
@@ -26,6 +42,11 @@
26 42
sudo ampy -p /dev/ttyUSB0 put ov2640_lores_constants.py
27 43
sudo ampy -p /dev/ttyUSB0 put ov2640.py
28 44
45
+
46
+
47
+
48
+
49
+
29 50
Then initialize and capture still frames using code like this. The included main.py contains an example.
30 51
31 52
import ov2640