Using an ESP32 and a Vibration sensor to Detect Steps

C
PHP
Website
Cloud
Arduino
IoT

For this ENGR 103 final project, my partner and I designed a set of programs to detect steps or vibrations on one ESP32 and wirelessly send a command to a second ESP32 (via a PHP webpage) to turn on an LED when a step or vibration is detected. (Trey's portion of the project) One ESP32 board has a vibration sensor connected to it. This allows the ESP32 to detect vibrations, which it can use to interpret when a step is taken. The ESP32 board is also programmed to connect to the OSU_Access WiFi. If the ESP32 detects that a step is taken, it will post the text "command=on" to a PHP form on the ENGR webspace. If no steps are detected, the ESP32 will post the text "command=off" to the PHP form. (Kevin's portion of the project) When the PHP form receives this text from the ESP32 sensor board, it will output the word "on" or "off" to a text file stored in the ENGR webspace. A second or output ESP32 board is also connected to the OSU WiFi and has an RGB LED attached to it. This ESP32 board will retrieve the text from the file created by the PHP form. This is the command for the LED. If the command received is "on," the ESP32 will turn on the green LED. If the command received is "off," the ESP32 will turn on the red LED. This process repeats approximately every 5 seconds. If the ESP board does not receive an updated command after 2 cycles (approximately 10 seconds), it will flash the blue LED until a new command is received. (The artifacts "ESP32 Output Board Program", "PHP Form", "Project Plan #2", "Project Showcase Video" and "PHP test program" were written by Kevin Berg)

1 Lifts 

Artifacts

Name Description
ESP32 Output Board Program This is the program for the output ESP32   Download
PHP Form This is the PHP form that receives the command from the sensor ESP32 board and outputs the command to a text file.   Download
Project Plan #2 Project plan for the PHP webpage and ESP32 output board   Download
Project Showcase Video A video describing the project in detail and showing it in action.   Link
PHP Test Program A program written to test the function of the PHP webpage without ESP board #1 (the sensor board)   Download