[AIoT] WebCamServer: ArduCam OV2640 Module + WIZnet-EVB-Pico
This is a Python implementation of WebCamServer using the ArduCam Mini 2MP Plus - SPI Camera Module and WIZnet W5100S-EVB-Pico board.
Things used in this project
Hardware components
WIZnet W5100S-EVB-Pico × 1
ArduCam Mini 2MP Plus - SPI Camera Module × 1
Jumper wires (generic) × 1
Solderless Breadboard Half Size × 1
Software apps and online services
CiruitPython
How to implement (Step by step)
Step1:
- Installation of Thonny (https://thonny.org) in your system
Step2:
- Run [Thonny] Interpreter:
- Select CircuitPython (generic)
- Select COM port for EVB-Pico
- Update firmware (if it is necessary)
Step3:
- Install CircuitPython Libraries
- Download libraries: https://circuitpython.org/libraries
- Open removable disk “CIRCUITPY”
- Make a folder “/lib” if it is not exist
- Copy required CircuitPython Libraries (below are required folders for ArduCam and Ethernet connection)
/lib/adafruit_wsgi/
/lib/adafruit_wiznet5k/
/lib/adafruit_requests.mpy
/lib/adafruit_minimqtt/
/lib/adafruit_io/
/lib/adafruit_bus_device/
Step4:
- Copy source codes to the root folder of the EVB-Pico board:
- Reference: https://github.com/ArduCAM/PICO_SPI_CAM
- Copy source codes below:
ArduCAM_Mini_2MP_Plus_VideoStreaming_HttpServer_v2.py
Arducam.py
OV2640_reg.py
OV5642_reg.py
Step5:
- Open Arducam.py source code
- Change SPI PIN number (default SPI is used by WIZnet ethernet)
- #self.SPI_CS=digitalio.DigitalInOut(board.GP5)self.SPI_CS=digitalio.DigitalInOut(board.GP13)
- #self.spi = busio.SPI(clock=board.GP2, MOSI=board.GP3, MISO=board.GP4)self.spi = busio.SPI(clock=board.GP10, MOSI=board.GP11, MISO=board.GP12)
ArduCam OV2640 Module requires CS, MOSI, MISO, SCLK pins for SPI connection, and SDA, SCL pins for I2C connection. This project modified the Arducam.py to use SPI1.
SPI1 configuration for ArduCam OV2640
- CS --> GPIO 13
- MOSI --> GPIO 11
- MISO --> GPIO 12
- SCLK --> GPIO 10
I2C configuration for ArduCam OV2640
- SDA --> GPIO 8
- SCL --> GPIO 9