ENGR 103 Final project

C
PHP
Arduino

As students for this final project, we were given the freedom of creating and including our own parts to use as inputs and outputs. We were allowed this one the conditions that one ESP32 would gather an input and write the input data to a php/csv file, while another ESP32 would read the data being wrote to the php/csv file and produce an output accordingly. For our final project we decided to connect our first ESP32 to an infrared motion sensor that would write a value 1 to the php/csv file if a warm object passes in front of it and a 0 if nothing is in front. The php/csv file was written to replace the previous value that was wrote to the file and replace it with the new produced value from the motion sensor. For our output, we wired a small speaker to the second ESP32 where a short jingle is played from if the code reads a 1 value from the php/csv file and will not play anything when a 0 is read from the file.

1 Lifts 

Artifacts

Name Description
Motion sensor input The C code file to get data from the motion sensor and write it to the php file   Download
PHP/CSV file File and code needed to run the speaker on stored information from the motion sensor input   Download
Speaker Output The C code file to read data from php file and play sound according to the value of the input   Download
Pitches of notes The .H file that is included in the speaker output code which defines terms used in the C code as certain frequencies   Download
Video of project running 4-minute-long video running and briefly explaining project and code   Link