This is the source code for the Arduino Due.
The Arduino Due is used as the main board. It executes functions to handle actuators and most sensors.
-
- Main file, in which libraries are linked, variables are declared and containing
void setup ()
andvoid loop ()
.
- Main file, in which libraries are linked, variables are declared and containing
-
- Contains the function
void tremaux ()
, the main function of the code, which is directly called onvoid loop ()
. It's responsible for executing the Trémaux Algorithm and calling other functions when necessary.
- Contains the function
-
- Adjust robot in the square, correcting its angle and centering its position. It uses ultrasonic and infrared sensors to adjust.
-
- Special version of the A* algorithm, responsible for the making the robot coming back to its start position. Based on the project A* Search on Processing.
-
- Functions to move the robot around using the encoders. There's a implemention of a PID with the encoders.
-
- Stores on flash memory information about the maze, in the case the robot needed to be restarted during the round. Not used on the final version, due to some errors on recording and reading data.
-
- Draw maze and print data on the LCD display.
-
- Read and return data from sensors.
-
- Orient robot on the maze, saving its Cartesian position and handling robot orientation.
-
- Deletes a route in case its a dead-end, avoiding the robot to take this path again.
-
- Menu run on startup to select which "program" the robot should execute (main, check sensors, test code...).
-
- Functions to handle motors.
-
- Some standard functions for the robot to move around.
-
- Analyze if the robot is on the ramp and make the robot goes up/down on the ramp without crashing in the walls.
-
- Check sensors and print them on the LCD display.
-
- A sandbox file (used for tests and implementing quick functions).
-
- Read temperature sensors from Arduino Nano and search for heat victims.
* Some files we're cleaned up to remove unnecessary comments (for a better visualization). To see the original version, check it here.