Software System
“We typed into the computer to tell the arduino what to do. The arduino then told the rest of our robot what to do with some cool different colored wires and tiny squares. After typing for several hours our robot seemed to work.” -Neel D
WebService
Using an ESP32 we are able to connect to WiFi, once given the WiFi name and password the code will return an IP. This is the IP that the user will use to control the ROV-R by plugging in the IP to their browser. The website, which is written in html, will react to user input by highlighting the movement they are attempting to do. Since a user can theoretically use both the W key to go forward and the left arrow key to spin left at the same time to turn left, we will condense that combination into a single character representation. Overall all the moves are processed into a single character and sent to the Arduino over Serial.
Wheel Motor Control
Once the user input is processed by our webservice, a single character is sent to our arduino over serial. We choose to do a single character mostly due to wanting to use a switch case that only takes either an integer or a character. This character is then used to call a specific method that controls wheel movement. For example, if the Arduino were to receive a letter through serial, we will check which letter it is. If the letter was “W” a method called goForward will be called, if it is “A” we will call goLeft. All of these methods were made by us, each method will tell each wheel motor which way to turn and how fast. Since we have omnidirectional wheels there was a multitude of combinations to make. With every iteration adding more and more motions.
Servo Motor Control
In addition to controlling all the driving motors. It also controls the servo used for the firing system to push marbles forward through the firing system and reloads the system in one motion.