Topics Covered
Changing Parameters
Try changing the distance parameter value - does the robot travel further?Error Messages
Try removing an semi-colon from a command line, then download the program to the robot.The "Compiler Errors" window will display a warning about a missing semi-colon. However, the compiler will automatically insert the missing semi-colon when downloading to robot. |
Using the Function Library
ROBOTC also comes with an extensive Functions Library, typically to the left of the code area. Try searching for commands, then dragging it into the code area.Similar to ROBOTC Graphical, dragging commands from the Function Library will generate the command with pre-populated parameter, which can be replace with the desired values. |
Did you know?
ROBOTC Graphical and Natural Language Mode![]() |
If you have experience with ROBOTC graphical, you can convert your existing programs over to ROBOTC "Text-Based" Use the "View > Convert Graphical File to Text" command to create a copy of your program in the text-based version of ROBOTC. |
|
![]() |
ROBOTC has multiple options and preferences available to customize your experience. For this curriculum, you will use ROBOTC Simple Behaviors using the Natural Language setting. Ensure the "Natural Language" mode is enabled, otherwise you may experience compiler errors. |
Did you know?
Pseudocoding![]() |
In robot programming we break robot actions into things that we call behaviors. An example of a robot behavior is “move forward”. When programmers begin to think about how to program their robot they need to break their robot's program into behaviors as they develop their code. |
|
![]() |
Abstracting these complex behaviors can involve a lot of steps. If you write the behaviors down along the way in plain English, you will end up with pseudocode, an English-and-code hybrid. Pseudocoding is considered a good programming practice, because: |
|
![]() |
It helps you keep track of what you’re doing at each step It helps to make large programs understandable It expresses your thoughts in a way that other humans can understand, and sometimes help you with It forces you to start organizing your thoughts in a way that gets you closer to being able to write working code |
Mini Challenge 1: Power vs. Distance
The Power and Distance Investigation involves changing the values of the power parameter to then see if there is a direct relationship between power and how far the robot travelled. The timing of the program will remain constant throughout the investigation.
|
Mini Challenge 2: Wind Sprints - Level 1
In the Wind Sprints Challenge, the robot is programmed to move forward 25 cm, then 25 cm backwards, then 50 cm forward, and 50 cm backwards - all the way up to 100 cm.
|