This is an old revision of the document!
Author: Stan Ionut Razvan
Email: ionut_razvan.stan@stud.acs.upb.ro
Master: SRIC
This project uses an ESP32 that reads inputs from sensors for a racing video game. It reads up, down, left and right inputs and sends them forward through HTTP to the game. The game has an HTTP endpoint accepting POST requests with inputs from the card. It tries to keep the game input state as close in sync as possible to the board.
The ESP32 board in this figure : * connects to the local WIFI adddress * reads the inputs from the obstacle sensors that are meant to represent the left, right movement. The board reads their analog values and if the value is below a threshold it considers that input (left or right) to be pressed * reads the inputs from the buttons that represent the forward / backward inputs * sends every X milliseconds a POST request to a specified endpoint sending a combination of the following strings separated by space: “LEFT”, “RIGHT”, “FORWARD”, “BACKWARD”. If a request misses a specific direction it is considered that the input is not being pressed
The frontend game side: * reads the POST request from the ESP32 board through a HTTP server running on a separate thread, parses the request and modifies its local variables given the inputs. * displays the game and adapts to the inputs given in a concurrently safe way