Engineering Design Project: Obstacle Course Navigation

Scott Talbot
2 min readApr 16, 2021

In this story, I am going to detail how I managed to get my robot to navigate through my obstacle course!

I began by downloading the source code that was previously uploaded to the robot, from the Elegoo website. This allowed me to read through and understand the code that made the robot function, thereby allowing me to deduce the best way in which to provide the robot with the coded instructions I wanted to use.

Considering that inside the stock code there was multiple functions already created, each specifying a different function / motion mode for the robot, I thought it would be the most efficient option to make use of these prebuilt functions when I go to build my code script. I decided I would focus primarily on time interval instructions for my script. This would allow me to predict the route of the robot with precise consistency over multiple runs.

Example of the prebuilt functions and “if” statements used in my coding script.

I was able to create a series of “if” statements in the code as seen above, telling the robot to, for example, travel forward for the first two seconds of the run, followed by a left turn for 0.5 seconds, etc. This ended up working extremely well, and from there it was just a matter of allocating the proper time intervals to each function such that the robot could complete the course in one go!

Below, you can see a video of the robot navigating the course. I shot this video in one run, using multiple cameras:

As far now, the final challenge is to complete the obstacle course, and fire ping-pong balls for the robot to catch using my launcher!

Stay tuned!

--

--