Activity 3 Basic Inputs Programming – vex introduction



Download 1.25 Mb.
Page2/3
Date28.05.2018
Size1.25 Mb.
#51405
1   2   3

POE VEX Testbed

Parts 1 and 2: Using the Bump Switch

  1. Open the PLTW ROBOTC template. Click File, Save As, select the folder that your teacher designated for you to save your ROBOTC programs in, then name the file A3_1_3_Part1.

  2. In this activity you will use all of the testbed input and outputs. Go to the Motors and Sensors Setup window. Configure the Motors and Sensors Setup to reflect the inputs and outputs to be used. Note that additional motors and sensors that are physically attached may be configured; however, these are not required to be configured. Click OK to close the window.

Cortex Wiring Diagram




















  1. Use the program below in the task main() section of the program between the curly braces.



untilBump(bumpSwitch);

startMotor(rightMotor, 67);

wait(5);

stopMotor(rightMotor);







  1. Power on the Cortex.

  2. Save the program. Compile and download the program. If you have any errors, check with your instructor to troubleshoot your program.





  1. Press Start to run the program and observe the behaviors.





  1. Document what this program would look like as pseudocode simple behaviors.



  1. Open the PLTW ROBOTC template. Click File, Save As, select the folder that your teacher designated, then name the file A3_1_3_Part2.

  2. The wiring configuration and motors and sensors tabs should be the same as above.

  3. Write a program that performs the following simple behaviors. Use the natural language functions where appropriate as shown below. Add comments at the end of each command line to explain the purpose of each step.

    1. Wait for the bumper switch to be bumped. Note that bump means that a switch is pressed and released and not simply pressed and held.

    2. Both motors turn on at half power until the sensor is bumped again.

    3. Both motors should then move in reverse at half power for 3.5 seconds.

    4. Both motors will stop.








      Natural Language

      Movement





      Natural Language

      Special


















      Natural Language

      Until





      Natural Language

      Wait


  4. Test the program and troubleshoot if needed until the expected behavior has occurred. Save the program.


Directory: ourpages -> auto -> 2015
2015 -> It rose out of the tropical Pacific in late 1997, bearing more energy than a million Hiroshima bombs
2015 -> Question 1 (Document-Based Question): 55 minutes Suggested Reading period: 15 minutes Suggested writing period: 40 minutes
2015 -> There are three kinds of plate tectonic boundaries: divergent, convergent, and transform plate boundaries
2015 -> Ap computer Science Principles Syllabus Teacher Contact Information
2015 -> Name Date Class No. Mission to Mars Read the passage. Then answer questions 1-3 in the spaces provided
2015 -> Adobe Photoshop cs5 & cs6 Apply a nondestructive mask to the current selection to the layer named Bird
2015 -> Author: Mark Twain Date of Publication
2015 -> Child abuse prevention month
2015 -> Main Film Genres
2015 -> Name Use your parent signature to answer questions 1 through 33

Download 1.25 Mb.

Share with your friends:
1   2   3




The database is protected by copyright ©ininet.org 2024
send message

    Main page