CE 432 Fall 2021 Tutorial 1: Getting Started Taylor Nakai tsnakai@fortlewis.edu
Introduction: In
tutorial, we followed two examples from the ESP32-CAM projects book by
Rui Santos. The two examples used the 'CameraWebServer' example and the
'LED' example. The tutorial was meant to get us comfortable using the
ESP32-CAM. In order for us to use the ESP32-CAM we needed to have the
latest version of the ESP32 module and rotate the 0 ohm resistor so
that the external antenna could be used.
Materials:
Materials
Quantity
ESP32-CAM
1
FTDI Cable
1
Power Supply
1
External Antenna
1
Push Button
1
10k Ohm Resistor
1
Jumper Cables
6
Bread Board
1
Task 1: In
task 1, we followed the 'CameraWebServer' example to be able to use the
ESP32-CAM to video stream, use face detection, and use face
recognition. To use the ESP32-CAM, we needed to get the ESP32's IP
address as seen in Figure 1. Once we had the IP address we could access
the ESP's streaming server. In order to use the face detection
functionality we need to modify the code by replacing the 'free()'
functions with 'dl_lib_free()' function. The first thing to do once
connected to the
stream is to activate the face detection option as seen in Figure 2. If
you turn on the face recognition option without enrolling a face, it
will detect you as an intruder as seen in Figure 3 and 5. If you have
an enrolled face, it will detect you as a subject as seen in Figure 4.
Figure 1. IP Address for ESP webserver.
Figure 2. Face detection using ESP32-CAM.
Figure 3. Unenrolled face using the ESP32-CAM.
Figure 4. Enrolled face using the ESP32-CAM.
Figure 5. Unenrolled face using the ESP32-CAM.
Task 2: In task 2, we
followed the LED examples in the book to be able to use the ESP32-CAM's
LED to blink, to use a pushbutton to control the LED, and to use the
PWM functionality to control the brightness of the LED. By controlling
the GPIO pins we are able to control the functionality of the LED. In
Demostration
1, we used the code provided to make the ESP32's LED blink on and off
every 2 seconds. In Demonstration 2, we used the code provided to be
able to control the ESP32's LED using a pushbutton, using GPIO2 to
recieve the signal to turn the LED on/off from the push button. In
Demonstration 3,
we used the code provided to use the PWM functionality to increase and
decrease the brightness of the LED.
Demonstration 1. Using the ESP32's LED to blink.
Demonstration 2. Using a pushbutton to control the ESP32's LED to turn on and off.
Demonstration 3. Using the PWM functionality to control ESP32's LED brightness.
Discussion: By
completing this tutorial, we were able to gain comfortability using the
ESP32-CAM. Rotating the 0 ohm resistor on the ESP32 to be able to use
the external antenna was probably the most challenging part. Learning
how to use the video stream, face detection, and face recognition
capabilities were useful and interesting. Overall, this tutorial was a
good introduction on how to work with the ESP32-CAM and use its various
capabilities. ---------------------------------------------------------------------------------------------------------------------------------------