1. I created a wired node with a network and a local interface to take a photo and display it on the web.
This week I decided to use the ESP32-CAM, a microcontroller that would allow me to take a photo. The task for this week was to establish a network between the device and a local interface, so I knew I needed to transfer the photo to my computer. With Shonit, I mapped out what would be needed in this information transfer: a node, a network, and a local interface (Fig. 1A).
Fig. 1A. Shonit's Map of information transfer.
We then further discussed that with node being the ESP32-CAM and the local interface being a program on my computer, we need to connect the node with the local interface by way of the network: IP address.
In Prof. Gershenfeld's example, he used a FTDI connector to bridge the universal asynchronous receiver/transmitter (UART) on the programmer board to a USB to be connected to the computer (Fig. 1B).
FTDI connector can be found on the right side of the PCB Design layout.
Fig. 1B. Prof. Gershenfeld's programmer board.
I I was preparing to design my own PCB layout similar to Neil's board. However, I could not find the FTDI component from the Architecture Shop and decided to just use with the ESP32-CAM-MB USB Programmer, which is basically a manufactured version of what I was going to make.
Fig. 1C. Assembled ESP32-CAM-MB and ESP32-CAM
I followed through this online tutorial, to create a local interface that enabled me to take a picture with the ESP32-CAM (Fig. 1C).
The example code from the website below:
#include "WiFi.h"
#include "esp_camera.h"
#include "esp_timer.h"
#include "img_converters.h"
#include "Arduino.h"
#include "soc/soc.h" // Disable brownour problems
#include "soc/rtc_cntl_reg.h" // Disable brownour problems
#include "driver/rtc_io.h"
#include
#include
#include
#include
// Replace with your network credentials
const char* ssid = "REPLACE_WITH_YOUR_SSID";
const char* password = "REPLACE_WITH_YOUR_PASSWORD";
// Create AsyncWebServer object on port 80
AsyncWebServer server(80);
boolean takeNewPhoto = false;
// Photo File Name to save in SPIFFS
#define FILE_PHOTO "/photo.jpg"
// OV2640 camera module pins (CAMERA_MODEL_AI_THINKER)
#define PWDN_GPIO_NUM 32
#define RESET_GPIO_NUM -1
#define XCLK_GPIO_NUM 0
#define SIOD_GPIO_NUM 26
#define SIOC_GPIO_NUM 27
#define Y9_GPIO_NUM 35
#define Y8_GPIO_NUM 34
#define Y7_GPIO_NUM 39
#define Y6_GPIO_NUM 36
#define Y5_GPIO_NUM 21
#define Y4_GPIO_NUM 19
#define Y3_GPIO_NUM 18
#define Y2_GPIO_NUM 5
#define VSYNC_GPIO_NUM 25
#define HREF_GPIO_NUM 23
#define PCLK_GPIO_NUM 22
const char index_html[] PROGMEM = R"rawliteral(