CE 351 Spring 2022
Homework 8
Name: David Lee

Email: djlee1@fortlewis.edu

ESP32 WiFi-BT-BLE MCU Module / ESP-WROOM-32

Introduction:
To be able to communitcate wirelessly with ESP32

Materials and Methods:


Results:

Task 1: Configure Arduino to work with ESP-32 and make it work.


Figure 1: Shows the Video of the ESP32 Blinking

Task 2: Make the ESP32 display the data from the sensor


Figure 2: Shows video of the Sensor Outputs

Task 3: Read the explanation in Code 1 - Code 5 above, repeat the work in Code 5, show the demonstration video in your report.


Figure 3: Shows video data changing in Gs

Task 4: Demonstrate the ESP communicates with the SD card, show results in your report.


Figure 4: Shows the SD card communication

Task 5: Modify the code to receive all AccX, AccY, and AccZ data in separate data files 'AccX.txt', 'AccY.txt', and 'AccZ.txt'. Use Python to read these three files and plot them in one figure (use Python is mandatory for CE students). If you don't know Python, use MATLAB to plot them. (Refer to the Appendix of this tutorial for an example Python code).


Figure 5: Shows the data plotted in python

Task 6:Using a master and slave setup from the ESP32s create wireless communication between the 2 for data transfer and show a video.


Figure 6: Shows the code used to finish the script


Figure 7: Shows the video of the wireless transmission happening

Task 7: Design the script to receive the accelleration data from the master wirelessly by the slave and store the data to the SD card connected to the slave board.

Figure 8: First Part of the code for wireless transmission

Figure 9: Second Part of the code for wireless transmission


Figure 10: Shows the Serial output of the successfull wireless transmission

Task 8: Remove the division operation being performed on the ESP board, delete all the unnecessary code for 'debugging purpose', remove the serial port settings, and get a clean script for the master and the slave respectively. Plot the saved data in Python (mandatory for CE students) or MATLAB.

I have lost the data for this task. And I am not able to plot it in Python without the data



Discussion:
  I was Able to sucessfully complete this assignment. The only problems I had was during the wireless communication I had multiple ESP32s that werent functioning correctly. Because of this I had forgotten to repost my solutions and in the longterm deleted the data for Task 8. However as you can see from Figure 10 I was able to successfully implement the wireless transmission to the SD card and store it. It had just gotten deleted before I was able to finish this report.