SOURCE CODE

The entire coding has been done in C.
To download our source code, you can clone our gitlab repository.

GITLAB REPOSITORY

About:

  • We changed the architecture thrice, which somehow equals to changing the code 10000 times.
  • For setting up the platform, we followed the following steps:
    1. We installed the EV3 software on my computer. This software provided a development environment for writing, compiling, and testing code on the EV3 platform.
    2. We connected the EV3 brick to my computer using a USB cable. The EV3 software automatically detected the connected brick and allowed me to communicate with it.
    3. We chose a C compiler - GCC - that was compatible with the EV3 software and my operating system, and installed it on my computer.
    4. We started writing the C code using the EV3 software. The code included commands for controlling the sensors and actuators on my EV3 robot, as well as logic for controlling its behavior.
    5. We used our C compiler - GCC - to compile the code into a binary executable that could be run on the EV3 brick. The compiler checked the code for syntax and semantic errors and produced an error report if any were found.
    6. used the EV3 software to upload the compiled code to the EV3 brick. The brick then executed the code and controlled the behavior of the robot.
    7. tested the code by observing the behavior of the robot and made any necessary adjustments. If I encountered any errors or bugs, I used the EV3 software or my C compiler to debug the code and resolve the issues.
  • We started by creating functions to get value from each sensors and return it
  • Then we created functions for each action, here, we also had some functions with same action but different input, for example, turning based on time vs turning based on compass
  • Finally, it was just scripting the bot to move to certain places and do certain actions by calling the easy to understand functions.