SumoBot code example for Lego Spike Prime
Big shout-out to Patrick Easter and Jose Augustin (SummoBot 2026 organizers) and the PyroTech young ladies that refereed the March 21, 2026 SumoBot Faceoff Challenge, it was quite a great show and event ! Thank you all. I would like to also thank the many competitors that helped our 'Sasquatch Trash Can' team learn this sport on the fast track the past two months. My grandson Jackson had a tremendous experience the entire time, it was fun to watch him grow into this technical realm. I'm building this wiki page as give-back in the way of depositing to the "TFI public knowledge fund" our Spike Prime robot programs as functional examples, in hopes that it furthers your efforts on the fast track of learning the programming aspect of this activity in the future. Enjoy !
I presented a 45 min lecture to a couple of folks and their young engineers on Feb 28 on the topic of Spike Prime programming based on my limited but satisfying and productive experience over the previous week. I had an 'Ah Ha!' moment 10 days prior on the topic after a couple of weeks of frustration searching for info only to find mostly youtube videos either too deep or too shallow. The 'ah ha' moment was as simple as finding this Spike Prime website containing excellent how-to pdf presentation-format learning in short easy to digest packaging. These presentations are logically organized for individual study, while hitting all the topics from basic to advanced Spike V3 and Prime programming using the 'Word Blocks' programming method. It is extremely useful ongoing during code development and I highly recommend it as the first step for anyone new to this robot programming language. Secondary to these presentations are the various Help topics you can access for any Spike Prime programming construct while in the programming environment; simply right click on the construct and you are redirected to the Help topic, which serves as a reference manual.
Here is the browser webapp link to the programming environment, as an alternative to client/local installed 1GB+ Windows app. I found this webapp to be very fast and 100% functional meeting all expectations I had for a programming environment including firmware compilation and download to the robot via bluetooth connect or USB connect.
And lastly, attached below are our various Spike Prime Projects (programming code) for everything from some simple motion and sensing for testing purposes while running the robot on "the field" (the 3 ft. diameter ring / white boundary). Tip: For 'field' simulation purposes at home, I use blue painter's tape to mark a 36" octagon at home on the office wood floor, which provides for a simple test field available. You'll see in the program code a simple means of changing the optical color sensor configuration to detect Blue vs. White.
Our SumoBot testing programs, motion tuning and drive wheel cleaning. linked in TFI Discord. Download to your local Windows computer (any folder) and 'Open Project' using the Spike Prime programming environment.
This is the fully functional SumoBot program that we competed with, Spike Prime Project source code linked in TFI Discord.
These are screen captures of the fully functional SumoBot program that we competed with. This was the best method I found to "print" the program code.