program requirements
The first step in writing this program is to define what the program will do. To implement the right-hand rule algorithm, the program needs to follow a wall to the right of the TriBot, moving into any openings on that side. The TriBot also needs to be able to detect when it has reached a corner, at which point it needs to make the appropriate turn.
It’s useful to create a simple list, called the program requirements, to describe exactly what the program needs to do. As long as the final program meets all the requirements on the list, then it should solve the original problem. Once you have the program written, you can use this list to test your design.
To develop the list of requirements, it’s useful to think about the different ...
Get The Art of LEGO MINDSTORMS NXT-G Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.