Day 54- Obstacle course conquered

Cormac Graham
3 min readApr 19, 2021

D-Day folks. The time has come for Elegoo and my engineering skills to be put to the test. The ping pong launcher is built. The ball catching component is attached. The obstacle course is ready. The robot is coded. We are fully prepared. Here we go!

First up-the code. I overestimated how difficult this part would be. Thinking that I would have to start from scratch and that it would be a nightmare, I kept putting it off. Finally, earlier this week I downloaded the source code onto my laptop and began to sift through it to try and understand it better. There were instructions and lessons on how to download and manipulate the code available online. I discovered that there is a millisecond counter/timer function built into the code. Using this timer and the basic motion functions (i.e. FORWARD, STANDBY, TURN LEFT, TURN RIGHT) I was able to get the robot doing exactly what I needed. I essentially added a script, so to speak, for the robot, with the timings all based off trial and error. It took a lot of time; updating the code, uploading it to the robot and testing it on the obstacle course over and over again until the timings were up to scratch. Each movement of the robot occurs at a specified time for a specified duration, so nothing is left to chance. This is my final code script, which I added into the void loop of the Tumbller code and uploaded onto the Arduino board of Elegoo:

This is the obstacle course with the ping pong launcher primed and ready:

Note how the launcher is angled slightly left. This is done because I have coded the robot to stop at the left side of the ball catching zone for convenience. Anyways, without further ado, this is how it went:

The book that can be seen fallen over was a casualty of a previous take I forgot to fix but has no impact on the outcome, as you can clearly see the ball easily clearing it before landing. One difficulty I encountered was that each time Elegoo navigated the course, he stopped in a slightly different position, possibly due to his self balancing mechanism impacting his journey. Also my launcher was firing a little inconsistently, which was frustrating because it had been very reliable beforehand, perhaps over using it was detrimental to the elasticity of the rubber band and/or the balloon. Altogether this took about 30 takes so I was delighted to get a good run in the end, as you might have noticed!

Well, I hope you enjoyed seeing my engineering skills put to the test. The launcher held up well and overall I think I was pretty successful in this assignment and ticked most of the boxes. Keep an eye on the blog for progress on more upcoming assignments including a Rube Goldberg machine!

Thanks for reading :)

--

--

Cormac Graham
0 Followers

Student mechanical engineer. Trinity College Dublin.