ROBOTC and Commands

¡Supera tus tareas y exámenes ahora con Quizwiz!

Pseudocode is...

a set of basic steps that the human can use to write the program

yellow words

simple error in code

A single line comment begins with...

two slashes (//)

Sensors that give a reading of 0-1 are called...

digital sensors.

Boolean Logic Symbols to know:

!= (not equal to), <=, >=

wait1Msec(3000);

If you wanted the robot to wait for 3 seconds, you would use the line _________________________

What special symbols mark a multi-line comment?

/* and */

What is a programming language?

a language that lets the programmer communicate a plan to the robot

A program is...

a logical and step by step set of directions for the robot to follow

green

what color are comments?

Cortex

Brain of robot

Digital sensors:

Bumper switch Limit switch Quadratic encoder Ultrasonic range finder

means it's not recognized

what does it mean if something shows up as black?

What does "wait" mean?

Commands wait for an elapsed amount of time

Green

Comments

3 types of behaviors:

Complex, simple, basic (Behavior becomes more specific/detailed as to what will happen as the behavior becomes more basic)

Digital switches/sensors

Either on or off, open or closed, 0 or 1. No in between. (bump switch, limit switch)

True or False: Simple behaviors are made up of complex behaviors.

False

Analog switches/sensors

Has a range, 0-something. (Speed on a fan, volume on a tv.) (potentiometer, line follower)

No, capitalization matters in ROBOTC

Is Task main the same as task main in ROBOTC

What purpose do tabs, spaces, and line breaks serve in ROBOTC?

It is easier for you to read and understand the code. (They do NOT affect the code)

Analog sensors:

Light sensor Potentiometer Line follower

Semicolon

Like periods in an English sentence, semicolons mark the end of every ROBOTC statement

After a statement has been run what statement does RobotC run next?

Next statement in reading order, left to right, top to bottom

Black

Not recognized

Boolean Logic:

Question statements that are true or false or yes or no.

What does it mean when a command appears in the color blue when typed in ROBOTC?

ROBOTC recognizes the command as an important keyword.

What does it mean when a word appears in color when typed in ROBOTC?

Red and blue mean that the computer understands. Green means comments and notes. Black means the computer doesn't understand.

What is a closed loop system?

System that has a way of monitoring itself.

What is an open loop system?

System that has no way of monitoring itself.

What is code

Text that is written as part of a program

What is code?

Text written as part of the program given to robot.

What is the brain of the robot called?

The Cortex.

wait1Msec()

The __________________ command allows you to specify an amount of time, in milliseconds, that your robot should wait before moving on in the program.

How does ROBOTC know where one statement ends and the next begins?

The line of code will end in a ; (semicolon acts like a period)

What happens when a program runs out of statements to run?

The program ends

What happens when a program runs out of statements to run?

The robot stops unless it is in a loop.

What is the purpose of curly braces {} in a ROBOTC computer program?

To mark the beginning and end of a loop/command

True or False: The role of the robot is to carry out the plan by following the steps in the program.

True

task main()

When the robot executes your code, it starts at ___________________

What purpose do tabs and line brakes serve in ROBOTC?

Whitespace, helps understood more clearly, more organized

Potentiometer and line trackers are both examples of...

analog sensors.

Sensors that give a reading of 0-4095 are called...

analog sensors.

Flow chart

are a visual representation of program flow.

__________ are a convenient way to talk about what the robot is doing and what it must do to carry out the plan created by the programmer.

behaviors

Bump switch, limit switch, and LED's are all examples of...

digital sensors.

green words

comments in code

black words

computer doesn't understand code

blue and red words

computer understands code

Pseudo Code

is a shorthand notation for programming which uses a combination of informal programming structures and verbal descriptions of code.

Whitespace

is the use of spaces, tabs, and blank lines to visually organize code.

what does it mean when a word in ROBOTC is blue/red?

recognized by the computer

Which one of these representations of Task Main will work in ROBOTC?

task main()


Conjuntos de estudio relacionados

Lab 14-8: Perform Memory Monitoring and Configuration: Linux configuration and installation

View Set

1-MMW: Is Math Invented or Discovered?

View Set

Ch. 07: Hypothesis Testing Procedures

View Set