Skip to content

Ethernet Library for ESP32-CAM using HSPI interface and W5500 module

Ethernet Library for ESP32-CAM using HSPI interface and W5500 module

Components

Hardware components

x 1


Project description

Original : https://github.com/arhi/EthernetSPI2 Ethernet Library for ESP32-CAM using HSPI interface and W5500 moduleEthernet Library for ESP32-CAM using HSPI interface and W5500 module

Ethernet Library for ESP32-CAM using HSPI interface and W5500 module

Allow ESP32-CAM module to talk to W5500 Ethernet module trough HSPI as SPI (VSPI) pins are used to connect the camera module

How to use

Check out examples/ESP32EthCamera.ino as it initializes the W5500, listens on port 80 and sends the JPG stream from the camera directly to the web client

Assembled from

  • Arduino Ethernet library v2.0.0
  • ESP32-CAM example "CameraWebServer"
This is mostly copy/paste and search/replace, there’s nothing "smart" done here. Ethernet library is search/replace to not use SPI but SPI2 and I renamed W5100 to W5500 (mostly so I’m sure I’m using the right one) and I initialized SPI2 as HSPI. The example .INO file is adapted to use this library and send jpeg stream.

Licence

  • My work - public domain / unlicence
  • Their work - Whatever is copied from those two is whatever their licence is

Hardware

  • ESP32-CAM AI-Thinker module (changing the CAMERA PINS should work with any other esp32-cam, but I have not tested)
  • W5500 Ethernet module (I removed the pieces for 5100 and 5200 from the library as I don’t need them)

Connection

  • GPI0 to GND and then reset to program
  • GPI1 and GPI3 to your TX, RX uart for programming
  • You need to disable power to the W5500 in order to program ESP32 (no idea why)
  • ESP32-CAM → W5500
  • GPIO12 → MISO
  • GPIO13 → MOSI
  • GPIO14 → SCLK
  • GPIO2 → SCS
  • GND → GND
I am powering both from same externam 5V source
Since GPIO2 is used for chip select this should not affect SD card operations as SD card is also using HSPI spi interface
Original data:

Ethernet Library for Arduino

With the Arduino Ethernet Shield, this library allows an Arduino board to connect to the internet.
For more information about this library please visit us at http://www.arduino.cc/en/Reference/Ethernet

Documents

Comments

Comments