RobotC logoI’m starting a new segment of this blog, with posts devoted to our transition from easyC to RobotC, sharing resources and tips that I learn along the way. DIscussed here: Why are we switching? and RobotC resources.

Why are we switching?

There are several reasons that we are making the move to RobotC.

  1. We’re ready. Up until now, all of our programmers were basically brand-new to the concept of programming, learning from scratch the way one has to think in the programming world: breaking things down into small, individual instructions, and learning how to create joystick programs (while loop) vs. autonomous (linear steps). For our team, it would not have been useful to try to learn the concepts of programming at the same time as learning the syntax required for RobotC.
    • Yes, RobotC also has a graphical, drag-and-drop interface, but it is extremely limited compared to the “real” programming interface.
       
  2. It’s free! Free, my favorite word. Sometime in the last year, VEX starting making RobotC completely free to download. Although the website says that RobotC is available with “VEX kits and bundles at no extra charge,” I was able to just log into my VEX account and download the RobotC software without purchasing a “kit or bundle.”
    • Since easyC is a pretty pricey software package, our team only had it installed on one computer, making learning to program very difficult for the other girls on the team, since only one person could use it at a time.
    • With free RobotC and a installation on a few computers, we can have multiple people coding at the same time or some learning to code while others work on the competition program.
        
  3. Easier to read on the screen. This doesn’t seem like a big deal at first, but easyC’s graphical interface has LOTS of whitespace in between each module/block, and as a result, you can only see 10-15 lines of code on the screen at once. Once your programs start getting more sophisticated and longer, it’s really difficult to manage when you can only see a small portion at one time.
    • Until recently, we also had a tiny, 11″ laptop in our lab, which made this all much worse. (No we have a screamin-fast 15″ laptop, and we are sitting pretty.)
        
  4. Ability to edit code directly. For RobotC users, this may be a head-scratcher (like, duh, edit the code directly). However, in easyC, while you can *see* the C code in a sidebar window, you cannot make changes to it; you must make all changes through the function “blocks” (at least this is the case with easyC v4; I don’t know if v5 is better).
      
  5. Ability to have multiple programs open at once. Again, this is sort of a “duh” feature; I think most software has had this capacity since some time in the early 1990s, but easyC v4, not so much. This limitation makes copying & pasting code from one program to another really difficult (especially since you can’t edit the C code directly).
      
  6. Debugging window that’s actually helpful. In easyC the options to get sensor data from the robot are three.
    • One, plug the computer into the robot and use the Online Window to see the sensor data down at the bottom of the window; however, it has been our experience that the numbers showing in this window are not always correct/accurate.
    • Two, use the “print to screen” block somewhere in your program, plug the computer into the robot and follow the robot around on the field, connected by an orange umbilical cord. Using a joystick? Oh wait, you can’t use print-to-screen at all. Oh, and good luck reading those numbers as they fly by on your screen at a million lines per minute.
    • Three (the most useful and realistic, IMO), purchase the $50 LCD screen and have your sensor data print to the LCD instead of to the computer screen. The downside here is that you can only show 2 pieces of data on the LCD at a time — one on each line. If you need more data than that, you need to get creative.

    In RobotC you have the ability to run the robot under normal driving conditions and see all sensor values simultaneously on the computer screen in the “Debug window”.
       

  7. WIRELESS DEBUGGING & DOWNLOADING! Yes, easyC users, you heard it here first. You must first buy a $50 widget (I got mine on eBay for like $20) called the VEX programming hardware kit. One end has a USB plug that you plug into your computer (just like the standard A-to-A orange cable that connects computer-to-robot) and the other end has a telephone-jack-type plug that goes into the “Program” port on the back side of the joystick (near where one plugs in the competition switch and partner joystick). The computer then communicates with the Cortex via the VEXnet keys.
    • It appears that the wireless downloading capability also works for easyC, but all I can find are people on the VEX Forum having problems making it work in easyC.
    • The debugging window shows all of that same information in real-time, wirelessly, just as if you were plugged into the Cortex directly, though it appears that there are some speed issues with many variables.
        
  8. Pseudo-multitasking. The VEX Cortex does not have the ability to multi-task (hopefully with next year’s V5?). However, RobotC has a feature called a “task”—really “background task”—and the Cortex can juggle performing instructions in the main( ) part of the program with the stuff in the task, giving the same basic functionality as multitasking (though in a reduced capacity as compared to a normal computer; the task can’t be all that CPU-demanding).
      
  9. Resources. As an easyC user, searching the VEX Forum for help in diagnosing a problem, or learning how to do something new is like being stuck outside in the snow, with your nose pressed against the window, looking at people inside drinking hot chocolate by the fire.
    • The VEX Forum is FILLED with RobotC code available for download, or snippets that show how to do specific things, or lengthy posts of people explaining how to stuff works. Got a problem with your code? Put that section of code into your Forum post, and people are willing to help you debug it.
    • There’s even a separate forum on the RobotC website — all RobotC, all day, every day.
    • When have I tried to ping the VEX Forum in the past for help with easyC, I had very few respondents who could help, and lots of other people’s responses were “you should use RobotC”. Gee, thanks.
    • There are entire libraries of sophisticated tasks that you can download that are (mostly) ready-to-use. In easyC, you have to reinvent the wheel (if possible) to do anything more than drag-and-drop.
        
  10. Gyro sensor. It is my experience that this sensor just does not work in easyC. Yes, technically you can plug it in and get some information out of it, but in our attempts the data coming to/being processed by the Cortex was so laughably slow as to render using any sensor data to control the robot a non-starter. Since the accelerometer sensor looks like exactly the same component as the gyro, I’m guessing it has the same performance issues in easyC.
      
  11. Robot Virtual Worlds. RVW is an online environment where you can program a pre-built “robot” to engage in various games and environments in the simulator, including the current year’s VEX competition game.
    • Free 10-day trial, then $49 for a 1-year license for 1 computer; $79 for perpetual license for 1 computer.
    • It allows your team to have some people work on programming and testing while other people are still building the robot. When the builders are done, your programmers will have a head-start on a competition-ready program.
    • You can also participate in the virtual world programming skills Online Challenge. Use easyC? Sorry, you can’t enter this challenge.

Resources for Learning

To start this journey, I followed the advice of someone on the VEX Forum (see above about programming languages and the Forum…) and watched all of the Carnegie Mellon intro-to-RobotC videos: the VEX EDR Video Trainer (free to watch online).

RobotC Video Trainer

Loved it. The explanations were crystal clear, there’s a mini-quiz at the end of each segment, and lots of PDF resources to download. After completing all of the modules I was able to program a little squarebot chassis with no problem.

Next, I’ll be running through the RobotC help page, which is text-based instruction/documentation. I will continue to post stuff on this blog as I learn it, to share the wealth!

Share this post: