More Programming Tips

Well, it is that time of the year again.
I want to take my programming skills to the next level next year. I am looking for some more help on doing this. Does anyone have any tips for programming, especially since I will start using PROS next year? Any tutorials whether that be for PROS, pids, odometry, etc? I really would like to compete at a worlds level. Anything helps.
EDIT 1: Any sensors that you would recommend/anything to help with those sensors?

Before jumping into programming, talk to you team about what you want to do in the next season. And make a plan. Jumping into it will leave you clueless as to what to do and you will get practically no where.

1 Like

The only problem is, I will be on a different team next year and our coach hasn’t approached us with those teams just yet.

oh, 20 characters. I hate the 20 character thing.

1 Like

If you have not used PROS before and have also not used sensors very much before, I’d recommend moving forward in stages and treating this like you would (should) any part of the design process (following similar steps).

I’m assuming here that you have access to your current competition robot and can use it (and make changes to it) without that being a problem to your team.

First, I’d transfer your current program into PROS and get it working correctly, typing it in and getting a feel for the program itself. At the end, you should have a decent PROS program for both driving and auton set up basically just as you currently have it.

Then, I’d pick 1 sensor that would help you to accomplish some particular ‘thing’ that you are interested in doing for the current game and I would focus on getting it to work correctly with the above program. After that works, I’d repeat for additional sensors. Each sensor has a decent supply of sample codes and online discussions; just type something like ‘Vex optical sensor code’. Examples (but put some design thought into what would have helped you most this season and select from that list):

  • Add an optical sensor to determine color of a ball and eject balls of the opposite color (if you don’t have an ejector built on your current robot, you can just eject out the top ones you don’t want and hold the ones you do, as this is just for programming practice). This also helps you develop the selection process (are you acting as the blue or the red alliance?).
  • Add a distance sensor and have the robot be able to stop xx distance away from the wall before a turn for a more accurate auton.
  • Add an inertial sensor and try to get your turns accurate to within a few degrees with the gyro.

During the above as a side project, work on PID for even movement. I’d leave off odometry and vision sensor work until you have a good grasp of all the more basic stuff.

This tutorial I thought was very well done: PROS


My team this year has an extremely packed schedule for the next few months, and I would prefer to transfer to PROS during an “offseason” or the beginning of next season. Would I do this same strategy then or would it change?

Yes, I’d do it basically the same - as soon as they are no longer using the robot for competitions and before they start tearing it down to build next season, if you can!

If the team is currently competing with the robot then of course you’d want to be careful not to cause them any problems, and you probably couldn’t proceed with sensor work on that robot (unless you can talk them into it for the benefits). However you still should be able to do the starting work of transferring your program to PROS and getting that running correctly. You should even be able to put it on the robot for testing, since you can always just swap back to the original program right after (that’s my assumption - any teams want to chime in on experiences with that?).

If you can’t get your hands on a competition robot, then maybe you can build a Clawbot (or similar) just to load down with sensors for experimenting? Or if you can’t get any physical robot, you can look into the virtual programming world. They used to have RobotC RVW, which I’ve used for training teams in the past; now they have VexCode VR and I think there’s another - maybe through RobotMesh?

If nothing else, you should at least start playing around with programming in your free time (watch tutorials, check out sample codes for sensors, download PROS and run through sample codes, etc) so that you are ready to move forward when you can.


What level are you currently at? I think my personal categorizations would be something along the lines of:

  1. Direct
  2. Organization
  3. Functions
  4. Sensors
  5. Complex Functions (stuff like PID)
  6. Odometry

With 1 obviously being the easiest and 6 the hardest.

1 Like

I’m around level 3.
20 chars.

Ok. I would suggest, as mentioned above, mess with some simple sensors. Something like the limit switch or bumper switch is a good place to start. You could mess around with something like spinning your intake or wheels until you contact an object.

You could try something a little harder, and do some very basic quad encoders, such as ramping acceleration.