![]() The first thing you should do with any RobotC code, is setup your motors and sensors, so that we can begin to program a drive. If you do not setup these motors, it will be a pain to change all of your motor names in your entire code once that is done. Essentially, make sure your robot has at least a chassis with motors on it before you start programming!ġ. Go to "Robot > Motors and Sensors Setup"Ģ. ![]() You will have many tabs to choose from, to setup the motor ports, navigate to the "Motors" tab, for Analog Sensors, navigate to the "VEX 2.0 Analog Sensors 1-8" tab, etc.ģ. Enter a name for the motor and/or sensor beside the correct port number. In the "Type" drop-down, select what type of motor or sensor you are using. IMPORTANT NOTE: You may have to reverse a motor, depending on how it is positioned on the robot.Ĥ. An example of a completed Motor setup can be found in the gallery above. ![]() Once you have successfully completed the Motor and Sensor setup, you should now have several lines of new code at the very top of your Competition Template. Robotc programming codes code#ĭo not try to change these values directly in the code while you are still learning, stay with the graphical Motor Setup!Ĭompetition includes, load all the files and values that the program uses to make it work in a competition. This means that if you need a Gyro sensor to be reset to 0, so the autonomous turns to the correct degree, this is where you do it! Autonomous: The Pre-Autonomous is the field where you tell the robot what to do, before the competition match starts.ĭO NOT edit any of these, unless you know EXACTLY what you are doing. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |