A robot doesn’t know what we want it to do just because we’ve connected a motor. We have to describe its behavior in code: when to move, when to stop, and what to do when something doesn’t go as expected. This course will help you learn how to make those decisions and turn them into a program.
This is a course by students on Spartronics for students learning to program. You don’t need programming experience. We’ll explain Python, the tools used to write it, and how to save your work with Git. You can work through the lessons at your own pace, using the examples and checks on each page.
How the course works¶
Setup comes first. Stage 0 introduces Python through small programs that you can read and change. Stage 1A puts those ideas into a simulated robot. Stage 1B reorganizes the same intake into a subsystem and commands, so you can add behavior without different parts of your program fighting each other.
By the end, you’ll have written an intake subsystem that handles piece detection, release, disabled behavior, and command interruption. You won’t need a physical robot to complete it. Full-robot integration, advanced control, and vision can come after that.
- Using this website
- Course Setup
- Stage 0 - Python Fundamentals
- Stage 1A - Make a mechanism work
- Stage 1B - A mechanism subsystem
Getting the most out of a lesson¶
Read the example and predict its output before running it. If your prediction doesn’t match, trace one line at a time. Then make the suggested change and try the exercise. Hints are there when you’re stuck; a solution is most useful when you can compare it with your own attempt and explain a difference.
Before opening a solution, save what you’ve tried so you can compare the two. Afterward, close the solution and make a change to your own code. Save your files and commit working changes as you go, using the routine from setup.
At the end of each stage, you’ll make a small change and check that your program still behaves as expected. Write down why it works, including any part that took a few attempts. Keep your notes and documentation open while working; you’ll use them often when programming a robot too.
Start with the website feature guide, then follow setup.