The software allows our OTV to do what it is able to do. Using the ENES100 arduino library provided by the class, we were able to completely control how our robot interacts with the world. The coding algorithm allows for swift navigation throughout the arena as well as accurately reading the pylon's data signal and reading the magnetism of the material.
An important aspect of the programming of our OTV was accurately navigating through the arena. This was difficult as our only means of knowing our robot's location was through the Aruco marker and the Ultrasonic Distance sensors. To properly navigate, I created several methods that allowed the OTV to essentially navigate to any coordinate in the arena I wanted to. This made both navigating to the pylon and navigating through the maze relatively simple.
For our mission, I had to implement several different components and combine their functionality. In particular, programming the data signal reader was a challenge as the linear actuator inserted the probe into the pylon, several hundreds of readings would be returned where the values ranged from 0 to 10000. To properly implement and read the proper data signal of the pylon, I had to implement an algorithm that converted the readings into a value between 1 and 9. This however, was not enough because we would often get inconsistent PWM readings so we had to only return the PWM reading that occurred most often as that would be the most likely PWM of the pylon.
The full code is available on github: