The robot exits the Right state once the front 2 sensors have gone high, so there is a possibility that the robot is in the Right state as it enters the intersection. When the robot approaches the intersection it may be caught in the Right state in order to correct itself on the straight line. Under normal priority the robot should turn left at the intersection. For example, the motor is coming to a 3 way intersection with left and straight directions in front of it. The robot is able to randomly ignore state priority because of while loops used in the code. By having the left and right sensors extremely close to the front sensors, the robot is able to make very small left and right turns to keep itself on a straight line. The robot is able to do the second 2 mentioned abilities because of the positioning of the sensors. With the 4 previously mentioned states our robot is able to make turns, turn around from dead ends, correct itself on straight lines, and create random turns that ignore the left turn priority. If none of the sensors are high, then the robot enters the Turn Around state where it does a 180o right turn in place. If neither of the previous conditions are true and the right sensor is high, then the robot enters the Right state until the front two sensors go high. When the two center sensors are high and the left sensor is low, the robot enters the Forward state. The robot enters the Left state whenever the left sensor goes high until the front two sensors go high. The left and right sensors are slightly farther back then the front two sensors and the front sensors are centered and side by side. Each sensor has a corresponding LED that lights up when the sensor is high. The four sensors are placed close together at the front of the robot. The state priority is in this order: Left, Forward, Right, and, lastly, Turn Around. The robot has 4 different states, and they are: Forward, Left, Right, and Turn Around. The robot decides its direction based off of the outputs of the four sensors.
#Any maze interface driver#
Unregulated power runs to the H driver as well. Regulated power runs to the PIC, the H driver, the RJ11, and the 4 sensors. Unregulated power goes to a 5 volt regulator. When it is on it is connected to a power supply of 4 AA batteries with 1.5 volts each for a total of 6 volts, this is considered the unregulated power. The sensors used include the emitter and the receiver as one part (didn’t have to worry about the emitter and receiver working together)Ī switch is used to turn the robot on or off.
![any-maze interface any-maze interface](https://aniphy.com/wp-content/uploads/2019/05/Animal-management-600x284.jpg)
#Any maze interface code#
Used analog sensors because they can be used as digital sensors and require less code to implement.
![any-maze interface any-maze interface](https://attainu.com/blog/media/posts/136/Screenshot-108.png)
Motor package, PCB board, and motor chassis were all from the same company and work together.
#Any maze interface software#
Designed to finish a maze in the fastest possible time *Project Members* : Ilya Natarius, Tony MarkertĬhose PIC18F2525 because it has multiple CCPs to allow for multiple pulse width modulators, it has _ analog inputs in case they were needed, it is compatible with the compiler software on our computer, didn’t care about a very fast clock speed…Ĭhose H-driver because it supplies the motors with enough current to run and we have used the H-driver in class before.Ĭhose regulator because it has a heat sink, so won’t burn up easily, outputs 5 volts with 1A max current.
![any-maze interface any-maze interface](https://thumbs.dreamstime.com/z/pac-man-game-maze-set-eighties-videogame-pacman-labyrinths-yellow-guy-angry-ghosts-video-backgrounds-vintage-gaming-app-213933006.jpg)