cover photo

COURSEWORK

deepak's IOT-001 course work. Lv 2

deepak panwarAUTHORACTIVE

An intresting title Part-2

6 / 2 / 2023


Level-2 # Task-3 ## Esp32 CAM Esp32 cam: ![](https://i.all3dp.com/workers/images/fit=cove =100 ravity=0.5x0. ormat=auto/wp-content/uploads/2022/02/08114828/esp32-cam-ai-thinker-pinout-random-nerd-tutorials-220106_download-7.jpg) The Esp32-Cam is a cheap, 2-megapixel, small-size camera module developed by AI-Thinker. It integrates an Esp32, a single 2.4 GHz Wi-Fi and Bluetooth SoC (System On a Chip), and an OV2640 camera. FDTI Programmer: The FTDI (Future Technology Devices International) programmer is a USB-to-Serial converter that provides a simple way to connect your standard Esp32-Cam to a USB port on your computer. ![](https://i.all3dp.com/workers/images/fit=cove =100 ravity=0.5x0. ormat=auto/wp-content/uploads/2022/02/08114845/ftdi-programmer-connected-to-an-esp32-cam-luca-dinale-via-all3dp-220208_download-1.jpg) Pinout of the serial connection: 1. Connect RX on the FTDI programmer to UOT on the board. 1. Connect TX on the FTDI programmer to UOR on the board. 3. GND to GND. 4. If you set the programmer to 5V, connect to 5V on the board; and if you set the programmer to 3.3V, connect to 3.3V on the board. Pin GPIO0 determines the Normal mode or the Flash mode of the module: - GPIO0 connected to Ground = Esp32-CAM in Flash Mode = You can upload the code. - GPIO0 not connected to Ground = Esp32-CAM in Normal Mode = The board executes the program. Esp32 camera stream example: 1. Go to File > Examples > Esp32 > Camera > Camera web server. 2. Comment out the “#define CAMERA_MODEL_WROVER_KIT” line and uncomment out the “#define CAMERA_MODEL_AI_THINKER”. 3. Replace the fields with Wi-Fi ssid and Wi-Fi password. 4. Make sure the Esp32 cam is connected to Arduino IDE and then upload the sketch. 5. After the Sketch is uploaded go to Tools > Serial Monitor. Copy the IP address of the web server in your browser. Click on the start stream button to start the camera. Images: Videos: 1. [ESP32 cam][1] # Level-3 # Task-1 ## ESP32 as a Webserver Parts required: 1. ESP32 2. 1 x LEDs 3. 1 x 330 ohm Resistors 4. Breadboard 5. Jumper Wires Connection: Here we are only using one LED, so you can either remove one of the LEDs or add the logic for the other LED in the code. Code: [Click here][2] for the Arduino sketch which has the code for this Task. Wi-Fi library is included for helping us with Wi-Fi related functions. Enter your Wi-Fi ssid and Wi-Fi password. The port is set to 80 for the server. And global variables are initialized for the code. The pin 26 is used for the LED connection. Images: Video: 1. [ESP32 as a webserver][6] # Task-2 ## Flashing Morse Code Parts required: 1. 1 x LED 2. 1 x 330 ohm resistor 3. ESP32 4. Breadboard 5. Jumper Wires Connections: First, connect the GPIO26 pin to LED and then the LED to the resistor. Connect the resistor to the ground of ESP32. Code: [Click here][5] for the Arduino sketch Procedure: 1. Make the required connections and upload the sketch. 2. Go to serial monitor. 3. Enter the characters whose morse code you want to flash. Images: Video: 1. [Morse code][3] 2. [Morse Code][4] # Task-3 ## Soil Moisture Sensor Parts required: 1. Soil Moisture Sensor 2. Esp32 There are two types of soil moisture sensor resistive and capacitive.Using capacitive soil moisture sensor is highly recomnmended because it doesn't corrode with time. Working: The more is the water present in the soil the higher is the output of the AOUT pin. Connection: Code: [Click here][7], for the sketch. Procedure: 1. Make the connections as shows above. 2. Upload the sketch onto Esp32. 3. Go to serial monitor and check the values. Images: Video: 1. [Soil Moisture Sensor][8] 2. [Soil Moisture Sensor][9] # Task-5 ## Read and Display Vitals Parts Required: 1. Esp32 2. Max30100 sensor 3. Jumper wires 4. Breadboard Max30100: The sensor is integrated pulse oximetry and heart-rate monitor sensor solution. Working: The device has two LEDs, one emitting red light, another emitting infrared light. For pulse rate, only the infrared light is needed. Both the red light and infrared light is used to measure oxygen levels in the blood. When the heart pumps blood, there is an increase in oxygenated blood as a result of having more blood. As the heart relaxes, the volume of oxygenated blood also decreases. By knowing the time between the increase and decrease of oxygenated blood, the pulse rate is determined. It turns out, oxygenated blood absorbs more infrared light and passes more red light while deoxygenated blood absorbs red light and passes more infrared light. This is the main function of the MAX30100: it reads the absorption levels for both light sources and stored them in a buffer that can be read via I2C. Connection: The MAX30100 has I2C Pins. So connect its SDA pin to D21 & SCL pin to D22 of ESP32 Board. The power supply required by MAX30100 is 5V. So connect its VCC terminal to 5V of Arduino nano. Code: [Click here][10] for the arduino sketch. Upload the code to Esp32 and open the serial monitor. Images: Video: 1. [Sensor Video][11] 2. [Sensor Video][12] [1]: https://drive.google.com/file/d/1o3hDRrvf1xPrs3CLDB_dCXW002f7FNa-/view?usp=share_link \Esp32 cam server" [2]: https://drive.google.com/file/d/1i1KebZbT2yXHESP7BTsUvaca7aLFbdcI/view?usp=share_link "Arduino Code" [3]:https://drive.google.com/file/d/1mNXSExdHxEMLLZYawy7RBVDv5oKWZd4r/view?usp=share_link "Morse code video" [4]: https://drive.google.com/file/d/1mQBHeKgi6-p2KjuhzFnQ0Pg0wE_gkAN8/view?usp=share_link "Morse code video" [5]: https://drive.google.com/file/d/1M1wLK_Z4KDBEnlDPYfk0DoS-M9s0Z32D/view?usp=share_link "Morse code code" [6]: https://drive.google.com/file/d/1mRcg8S7MOPvj2II6YTmKbR7B0VsJm1Qw/view?usp=share_link "ESP32 as a webserver" [7]: https://drive.google.com/file/d/1hU7bz7sIG3Imfcpt4HspkKYTu8x6Y3wZ/view?usp=share_link "Soil moisture sensor code" [8]: https://drive.google.com/file/d/1mN8s0GZ805Uta77bG9gFEJRYXIUc0n3o/view?usp=share_link "Soil Moisture sensor video" [9]: https://drive.google.com/file/d/1mKNo28b8bCff9qX8QMs9SYPHNGAmU2Cj/view?usp=share_link "Soil moisture sensor video" [10]: https://drive.google.com/file/d/1XkGhVviGaogT8zj0BAKGC9n11qDYPaiK/view?usp=share_link "HeartBeat arduino sketch" [11]: https://drive.google.com/file/d/1mZSfN8AaVomOayHBtP7q1GBzJ_DLwyp6/view?usp=share_link "Sensor Video" [12]: https://drive.google.com/file/d/1snUgeqOv76lCeWUN6v0j9zznTubjHhI3/view?usp=share_link "Sensor Video""

UVCE,
K. R Circle,
Bengaluru 01