VEX1(3) - PROGRAMMING FOR VEX 1 Josh LaBrie Toshali Randev...

Info icon This preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
1 PROGRAMMING FOR VEX 1 Josh LaBrie, Toshali Randev, Bryce Mosley, Katie Murray
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 TABLE OF CONTENTS Page 4 Introduction Page 5 Programming Basics Page 6 Activity 1 : Think Like a Computer Page 9 Initial Set-Up Page 10 Motors Page 11 Our First Programs Page 12 Virtual Worlds Set-Up Page 13 Activity 2 : Sentry Simulation Page 14 Variables Page 15 Functions Page 17 Activity 3 : Functions Practice Page 18 Activity 4 : Labyrinth Page 20 Conditional Statements Page 22 While Loops Page 23 Activity 5 : Conditionals on a Stormy Night Page 25 Driver Code Page 27 Controller Set-Up Page 28 Camp Program Template Page 29 For Loops Page 31 Sensors Page 35 Activity 6 : Line Tracking Page 36 Appendix of Additional Activities
Image of page 2
DAY 1 3 Goals for Day 1 of STEM Camp: Ø Introduction & programming basics Ø Programming syntax Ø Motors Ø Variables & functions All students should be able to: Ø Write simple functions Ø Complete labyrinth For advanced students: Ø More info on good code, additional activity in Appendix Ø Additional virtual worlds activities in Appendix
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
DAY 1 4 INTRODUCTION There are two different languages that are used in VEX. Your school may use either one, but we use RobotC. The same principles can be applied in both applications. EasyC – This is a graphic-based language. You drag and drop command statements and control structures into place. RobotC – This is a text-based language. You type commands and control structures into place. Steps to success in robotics: 1) You need to have a functional robot. There is usually a small window of time between completing your robot and going to the competition. 2) You need to create a wiring diagram of your robot. It is important to label the robot’s motors and sensors so that you know where they go. 3) Decide what the robot needs to do. For the summer camp, this is easy since the course is sequential. 4) Begin programming. We will learn to program on a virtual world developed for RobotC. 5) Test your code with your robot. Programs and robots need to work together for you to be successful. 6) Win the competition!
Image of page 4
DAY 1 5 PROGRAMMING BASICS What is RobotC? RobotC is a programming language used to create and execute programs for VEX and Lego Mindstorms. You need to know how to program in RobotC for your robot to work! Programs are used for both the autonomous and driver-controlled portions of the competition. What is a program? A program is a list of directions for the computer to follow. Although computers may seem very intelligent, they are actually not. You need to tell the computer every single step in a process, or else your program will not execute! Five Steps of Programming You must answer these questions throughout the programming process: 1. Understand purpose : What does my program need to do? What are my goals?
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern