Save
Upgrade to remove ads
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

Stack #4613684

QuestionAnswer
What is the difference between using // and /* */ in your program? // is for single line pseudocode. /* turns on multiline pseudocode and */ turns it off.
How does a while() loop work? With a while loop the robot checks the condition. As long as the condition is still true, the commands inside the curly brackets will be run. As soon as the condition is not longer true, the robot stops running the response.
With 4 inch diameter wheels, about how far will a robot move if the wheels rotate 720 degrees? C=pi*d. C= 3.14*4” = 12.57” So 720/360 (degrees per rotations) = 2 rotations. 2 rotations * 12.57” per rotation = 25.14inches. (A little more than 2 feet.
Why do you need ==-1 as part of the conditions when using sonarSensors? You need the || ==-1 with the sonar sensors because if a target is out of sensor range then the sonar sensor will detect nothing. So if SensorValue[sonarSensor] >range ||
Why must the “reset encoders” command be written outside, instead of inside, the while loop? If “reset encoders” command were inside the while loop, the encoders would constantly reset and the robot would never reach its goal.
Which of the following is the proper lift arm code? To lift the arm, you would use motor[armMotor]=(some #); //to turn the motor on. Wait1Msec(some value); to allow the arm motor to run for a certain amount of time. Then motor[armMotor]=0;//to turn the motor off
How does battery level affect motor speed? Weaker batteries make the motors run with less power. So if you are simply relying on motor power and timing to get distance, then the robot will not move accurately. Therefore, we use the encoders.
With " while (1==1) " how many times will this while loop run? While(1==1) is always true. So that condition will always run. In this code, a constant value is set for the distance previously traveled. It remembers how far it went.
const float traveled = SensorValue[leftEncoder]; (What is happening in this code?) In this code, a constant value is set for the distance previously traveled. It remembers how far it went.
How much time will the program wait before moving? wait1Msec(4200); Wait1Msec(4200); is equal to 4.2 seconds
Which ROBOTC command allows you to set the power level for a motor connected to your robot? Motor[“motorName”] = some number; //sets the motor power level.
What is the purpose of using functions? How does it make writing code easier? Functions are a series of commands that you will use multiple times in a program. Creating functions allows the code to be shorter.
In ROBOTC programming, all simple statements end with a(n): Commands end with a semicolon.
If you have 4" wheels and want the robot's wheels to rotate 1520', how many feet is this equivalent to Similar to 3. C=pi*d. C= 3.14*4” = 12.57”. 1520/360 = 4.2 rotations. 2 rotations * 12.57”/rotation = 52.79”. 52.79” /12”per foot = 4.4 feet.
What is the range of the power level options for the VEX motors? . Vex motors can run from 0-127 (+ for forward, - for backward.)
What is the purpose of " SensorValue[leftEncoder] = 0; " That command resets the encoders.
What are the 3 parts of a function? . Declaration, 2. Definition. 3. Usage
What pseudocode would best fit this code: while((SensorValue[sonarSensor] > 10 ) || (SensorValue[sonarSensor] !=-1)) While the object is more than 10 cm away, OR no object is detected.
If "count" starts at zero and while(count <=5), how many times would the while loop run? 6 times. (It will run on 0,1,2,3,4,5)
What is a float variable used for? Float variables are used when the value will be a short decimal
How do you make your robot swing turn? A swing turn is when one wheel is on, and the other is off
How do you make your robot point turn? A point turn has one wheel running forward and the other wheel running at the same speed in reverse. (example: point turn right. Left motor forward 60, right motor backward 60.
What does the sonar sensor do? (How do you write code for it?) The sonar sensors detect the distance to an object.
What will the robot do if the threshold is 1570 and you are shown 3 if statements with specific values? If a variable is titled threshold, then the only if statement that will run is the one whose condition is above the threshold value of that sensor.
Created by: 1047862.
 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards