This is the program I used in 2016 VEX Championship
This is my source code for VEX Robot Championship in 2016. You can find the game there :Nothing But Net.
Also, you can find my team there: 7627A, I am serving as the main programmer in VRC 2015-2016: Nothing But Net (Yes, the best score in the team history!).
Written in easyC V4 for Cortex. They are providing V6 now, check it out.
Our robot is a catapult with one extra shooting device: a firing pin to handling the long-range shooting.
Since this is my first “meaningful” program, it contains a lot of BAD habit.
Please forgive me naming the variable by pinyin, commenting by Chinese, and even using the unmeaningful word “hhh”, I was young :P
The main() contains three functions: Initialize(), Autonomouse() and OperatorControl().
Initialize() did NOTHING. Yes, I do not know what is Initialize at the time I write this program, so I left it blank.
In the Autonomous stage, the robot operated ONLY by this function, with no player control.
It basically does two things: the firing pin shoots the preloaded balls and moves to the center of the game field.
Here is the play control stage, since it’s a catapult, I write a special function for loading the ball.
zidonglaxixan(): means automatic pull the rubber band to providing the force of shooting.
The robot has two sensors for detecting the loading stage.
It is working like this: