How To Make Almost Anything Neil Gershenfeld

BENJAMIN VILLA

MIT Center For Bits And Atoms


Fab labs share an evolving inventory of core capabilities to make (almost) anything, allowing people and projects to be shared. These are my projects.

Networking-

10.27.21

assignment

individual assignment: design, build, and connect wired or wireless node(s) with network or bus addresses

group assignment: send a message between two projects

[1] Using my previous two boards, the ESP32-Cam I got working in Week 9 and the multipurpose board I designed in Week 10, I decided to connect to a Webserver using my phone’s hotspot function. As for my final project, I wanted to stream video footage wirelessly to my computer to then analyze using computer vision, this seemed like a useful task to accomplish this week. I also wanted to begin searching how to use machine learning to identify objects and count them from the streamed video footage. As I don’t have a lot of programming experience, this seemed like a task that would require a lot of learning on my part.

First, though, I needed to get the server working using my ESP32-Cam and my ESP32 board. Iulian offered a workshop on networking on Saturday which I attended and was extremely helpful to understand how signals worked. After this, I was able to find a program that had been written in Arduino that allowed the ESP32-Cam to stream footage to a website at three different resolutions. This was perfect for what I needed, as I wasn’t sure what resolution would be needed for computer vision to identify live video footage. For all I knew, I would only be able to do it for images, or for a very low resolution. I knew I would be able to get image recognition of one image, but I wasn’t sure if I would be able to get it working for a continuous video stream.

When I first tried creating the server, I kept getting an error. I thought something was wrong with my code, but after some troubleshooting, I realized that the ESP32 Cam requires that a different board be selected in the Tools-Boards menu on Arduino IDE. I had selected ESP-Dev Module and instead, I needed to select, AI thinker ESP32 CAM. After selecting the appropriate board, I was able to upload the code using my iPhone Network name and password to my ESP32 CAM. The program appeared to upload properly, however, when I tried running the web server to watch the video footage, it wasn’t working. Checking the Serial Monitor didn’t display any help either. I tried disconnecting the board turning it off and connecting It again. This didn’t seem to work wither. Already quite frustrated, I decided to try one last step, turning the Hotspot on my phone on and off again, and connecting my computer to the same WIFI network so that the ESP32, my phone and my computer would all be in the same network.

This seemed to resolve the problem. I saw on the Serial Monitor a message stating, “Camera OK” and the HTTP where I could access the stream. I waited a couple of seconds and then attempted to access the web server from my browser and managed to gain access to the ESP32 CAM wirelessly. The ESP32 Cam would only require power and could stream video footage to my computer for further analysis using OpenCV or machine learning. But that task would be for the next week.

Considerations:
-Turn Hotspot on and off again when troubleshooting.
-Remember your computer, iPhone and ESP32 cam must all be in the same network.
-The ESP32-Cam board selection so different from other ESP32. AI Thinker ESP32 CAM must be selected instead of ESP-Dev Module.
-You must install ESP32 in Arduino IDE Boards Manager.

Download Files