Sometimes it can feel like the robot is just not doing what we want it to. We don't speak the same language after all, making it feel like something is lost in translation.
With practice we can better understand what we're programming the robot to ACTUALLY do vs. what we THINK we've asked the robot to do. Especially after growing more familiar with how the robot interprets certain movements and actions.
A pseudocode represents a program, but is described using everyday familiar wording. It's a way to break things down in a more digestible way while thinking through what we want the program to do without getting lost in technical jargon.
When working on a large project, creating a pseudocode during planning can help students think about what they expect the robot to do and what the end goal will be.
Writing a pseudocode is like writing directions for how to make your favorite snack. The directions need to be clear, but simple so someone else can easily follow along.
Use important keywords/statements (if/then or if/else, while the loop, assign the variable, etc)
Think about the order of operations and logic
Notate a clear structure of where a program starts and stops
Keep it simple!
The above provides key things to keep in mind when writing pseudocode, but there's no one right way to write one. How we thinking through a program changes per person and task!
The easiest way to practice writing pseudocode is to pick a simple task for the robot to complete and writing from there. Let's look at the field for the Unit 4 activity from the Intro to Robotics V2 curriculum as an example:
Let's start simple. Maybe we want the robot to stop at the first bin on the left. How would it get there? Try writing a pseudocode before looking at the sample answer below!
For the rough draft of the pseudocode, the timings and movements do not need to be perfect. In fact it's likely it won't be perfect the first time.
This is about building a framework to make adjustments from!
Consider more challenging movements like:
The robot drives to the far bin, then back to one of the side bins.
The robot moves between two of the side bins.
The robot stops at the first bin on the left then the upper bin on the right.
Have students partner up with one student being the "robot" and one being the "programmer". Next, choose a simple task, like the robot walking across the room and picking up an item, that the programmer will write a pseudocode for.
Once ready the student "robot" will follow the written directions!
While completing this activity, student "robots" should do their best to follow the directions provided to the best of their abilities, however they should also be encouraged to be silly and have fun with it if there are key things missing, like units of measurement. Students will likely observe differences in what someone considers a "step" or even how they count seconds.
Note: They do not need to feel restricted by the limitations of Blocks or OnBot Java!
After "testing" their program, students should swap roles and may repeat this activity for practice.


