Programing Guide

I graduated last year and now am attending a college-double majoring in robotic engineering and electrical engineering. The stuff I learn each day is amazing, and it shocks me how I can apply all it to my 4 years of Vex experience. On the side I’ve been teaching my old team some programming basics, but theres just too much to teach! So I started writing a programming guide of sorts. And after making sure it’s somewhat legible, I decided i’de share the PDF online. Maybe it’ll help someone. The DL link is below(dropbox), and I will be updating it often (it’s about 40% of what my goal was, and half as fluent as i’de like it.)

Feel free to post any comments/critiques/questions below. I’m opened to re-explaining anything that isn’t understood, or fixing anything I may have wrong. (i haven’t gotten too far into the actual vex programing yet).

great idea. what college are you attending? I want to go to school for mechanical/robotic engineering but i was to go somewhere with a good programing field

Actually at the moment I’m attending Johnson and Wales University in RI. It’s not portrayed as being anything special, especially in its engineering department, but I’ve been REALLY impressed since I’ve gotten here. I’m hoping on transferring though to WPI at the end of this year though. There are TONS of good colleges for Robotics - they just take time to find; and they’re really competitive to get into.

Thanks for doing this! There are so many resources available, but most are not summarized/overviewed. A beginner who doesn’t know how to ask the right questions can really use a guide that “spoon-feeds” them important concepts. I like the organization you’ve chosen.

I think this will be essential to your guide. People who already have some programming experience won’t need the guide as much, and those who need it may not know where to begin. The more actual code examples with exact syntax, the better. A few suggestions:

  1. Since your guide is for EasyCv4, I suggest using exact code (with debugged syntax) rather than pseudocode. Someone who is experienced enough to understand pseudecode probably already knows the basics.

  2. When you give an actual code example, explain what ports are being used and what mechanical parts should be connected to those ports.

  3. When you choose your examples, the more concrete, the better. Think of what a robotics student would actually want to do, and sneakily connect their desire with the concept you want to present.

Here’s an abstract example:
Suppose you want to create an infinite loop that goes on forever. You would use the command
while (1==1)

Here’s a more concrete example from EasyCV2 (I’m not as familiar with V4):

Suppose you want your robot to continually respond to an R/C control and never stop responding until the robot is turned off. You would use an infinite loop like the following:

while (1==1)

The 1==1 condition is always true, so the loop continues forever (never stops). The MotorRcControl command uses Rx1, connects Channel 2 (right joystick on the transmitter) to a motor plugged into Motor port 2, and the final 0 instructs the motor to be driven in the forward (rather than reverse/inverted) direction.

[/end better example]

I’m really looking forward your finished product, as the rookie students I’m continually working with could really use it. If you have questions or would like assistance, please let me know.


Awesome! Yeah I’m sure I could use some help - I haven’t used EasyC in a year now! (It’s sad :frowning: ). I’ll definitely keep you up to date/ask you for assistance often. I’m hoping on getting a new version up by Next Thursday (it’s delayed because I’m going through Finals) with a lot more clarity and examples. You make a lot of great point/examples. Mind if i use your [better example]? Ill cite you

Absolutely, you’re welcome to use the example.

I’d be happy to assist, but I also don’t want to be too intrusive, as this is your “brain child.” I’ll PM you later to see what kind of input you want/need and also work with your timetable.

Awesome :slight_smile: thank you. I’M dedicating much of today/this long weekend to working on it. Been super delayed - but have been thinking about it :slight_smile:

on a side note: VexRobotics retweeted my programming guide! w00t!

Are you planning on doing anything for RobotC? because a lot of beginners are now going straight into RobotC since it eliminates the need to upgrade software once you understand programming better.

Ive never used RobotC. And now that I’m in college, I don’t have my teams funds to spend. I would love to start one eventually :slight_smile: and you make a great point, so I may just start looking into it!

BTW, I have gotten a bit more done, and probably will update it tomorrow

Yeah it’s late and it’s nothing special but I have the updated version now. (It has a few small changes and the flowchart section)

It possible to edit my first post with the new link? Also, anyone know a file sharing site where i can have ONE download link, and update the file? I don’t want a new download link every time.

ALSO! Want to help!? I have a copy of the version on google docs. I know it’s risky posting this online, but I can always remove it or PM people it if it gets out of hands. Feel free to change what you’d like, and put yourself in the Credit section along with what you did. Ill pretty it up later.

I made a few cosmetic changes, and also revised/added to the end of your Chapter 1. I hope that you have a saved copy of your original – it was my intention to make modifications, download the changes (unsaved to your file), then e-mail them to you, but the Google Docs automatically saves every few seconds, so your original isn’t there:(. Anyway, I hope I haven’t mutilated your document too badly – most of the “damage” is at the end of Chapter 1, so you can repair accordingly if you need to.

Looking over the “flow” of your document, I realized that my “concrete” example for while loops might not be suitable here, because the command/concept of MotorRcControl hadn’t been taught yet in your document; the pseudocode you originally had would be more consistent with the other examples you’ve given. When I made the comment, I was thinking of using your document as a replacement for what I’d originally been using previously, as it gives rationale/background where other resources had been lacking. However, as I thought more about it, your document with pseudocode would dovetail nicely as a follow-up to what I had been using. What I’m envisioning as curriculum is:

  1. Use the Vex programming tutorial to get the students’ feet wet with actual code.

  2. Introduce them to your document as a follow-up to give the theory of what was programmed and why.

Of course, you (and others) would use it for your own purposes and in your own way, but that’s how I can see it being useful.