Programming instructions

Reference
Project Lead The Way
©
and Carnegie Mellon Robotics Academy
©
/ For use with VEX
®
Robotics Systems
Program Design 1
Program Design
The steps below should be documented in your engineering notebook . Some of the information will then be
transferred to the PLTW ROBOTC program template.
1. Describe the task or overall goal that your program will accomplish. This may be described as one or more
complex behaviors.
Example: A fan will run until someone needs it to stop. There
will be a warning light as a safety device before the fan turns
on and another light to indicate that the fan has stopped.
Note: This text will be used for the Task Description in the
PLTW ROBOTC program template
Creating Pseudocode
As you begin to break down your behaviors into individual actions
do not worry about syntax or which commands will be used with
ROBOTC. Simply describe them in short phrases such turn a motor
on for three seconds or follow a line until running into a wall.
2. For each complex behavior break it down into Simple Behaviors
line by line in the order that each should happen. Try to describe
actions and what prompts each action to continue, start, stop, etc.
Example:
A warning light comes on before the fan starts for three
seconds
The fan turns on and runs until a button is pressed
A different light turns for three seconds before the program
stops
3. For each simple behavior, break it down further to Basic Behaviors. Try to think in terms of what each
input and output component will be on your device.
Example:
Program begins
Light 1 (LED 1) turns on
for three seconds
Fan (Motor 1) turns on
Until a button (bumper switch)is pressed
Light 2 (LED 2) turns on
for 3 seconds
Program ends
Note: This text will be used for the Pseudocode in the PLTW ROBOTC program template
Planning your program may occur after you have sketched or built your physical device. It may also
occur before or at the same time depending on the your challenge. Regardless it is good practice to
do some planning for your program before writing code. This document outlines a strategy for a simple
example to show the process. Please review the reference Behaviors, to familiarize yourself with basic,
simple, and complex behaviors.
Go to Reference Links