Entry Points to VEX and the REC Foundation
This article shows users the available VEX and RECF coding resources and content.
An Introduction to Coding
Writing code uses - syntax, structures, commands, parameters
Creating logic uses - sensor data, conditionals, loops, operators
Interfacing with the world uses - motors, mechanisms, manipulators, motion
Computational Thinking uses - algorithms, abstraction, critical thinking, problem solving, creativity
The love of code uses - failure, perseverance, and the overwhelming joy when your code finally works
All of these components are what makes a robot, a robot. Coding is the glue that brings all parts together and lets students express their ingenuity by creating an amazing solution. Coding with robotics can change student's lives by showing them what they are capable of achieving.
Tim Friez - the VEX intern that never left. Now VP, Educational Technology at VEX
Interviews With Students About Coding
Watch and learn from interviews as teams and students describe how they approach coding.
Accessing VEXcode
VEXcode is the coding tool made by VEX for VEX robots. There are versions for VEX 123, GO, IQ, EXP, and V5. There is also a VEXcode VR that lets you program Virtual Robots.
- Get VEXcode at code.vex.com
Learn Coding With Video Tutorials
Inside every version of VEXcode is a TUTORIALS button in the top left. This button gives you access to video tutorials on a variety of subjects, and is a perfect place to start.
- Run your version of VEXcode and click TUTORIALS
Use VEXcode Help
Inside every version of VEXcode is a HELP button near the top right corner. Help explains how each block or text command works, and includes example code.
Help exists for
- Block
- Python
- C++
Start With Virtual Skills
Virtual Skills is a good place to get started with coding for VEX Competitions.
New teams find it difficult to get started on coding robots because the team coders often do not get time to learn.
- The build team is always driving, changing, and testing the robot
- The robot is never "done"
- Testing code requires constant field reset and battery charging
Benefits:
- Learn coding know-how
- Understand game strategy skills
- Get ready to code your own robot in Blocks or Python
- Improve your debugging skills
- Improve your coding confidence
Code written in Virtual Skills will not transfer over to the team's custom robot, because their robot is undoubtedly different from the standard Virtual Skills design. However, the coding knowledge, game knowledge, and debugging skills learned from coding in Virtual Skills will be invaluable when you start coding the physical robot.
Virtual Skills is not a competition like VIQC or VRC. However, there is a leaderboard where you can see how your high score compares to other teams.
Should I Use Blocks, Python, or C++?
Start with Blocks
For beginners we recommend starting with Blocks for VEX IQ and VEX V5.
- Readability: commands are easy to read
- Memorization: all of the commands are visible to the user
- Typing: drag and drop interface with little typing is needed
Read more about Why Learning Blocks First in recommended
Transition to Python
For a coder who is ready to move to text, we recommend Python, unless your team or coach is more proficient in C++.
Why is Python recommended over C++?
- Readability: Python contains less jargon and syntax than C++
- Future jobs: Python is used more widely than C++
- Education: Python is more likely to be taught in school
- Performance: Python performance is comparable to C++
Learn Coding by Reading Articles
The VEX Library has articles on coding that include
- Getting started
- Installing VEXcode
- Opening and saving projects
- Robot configuration
- Tutorials on Block, Python, and C++
VEX Library links:
Learn Coding With Virtual Robots
VEXcode VR (Virtual Robots) is a great way to learn coding while avoiding the need to charge batteries or reset your field every time you want to test your code.
- Get started at vr.vex.com
- Video tutorials and examples are available
Coding Support
There are multiple sources of support.
From your Coach
- Coaches know more than you think. And they can ask for help from other coaches and teams.
VEX Forum
- Students and coaches can post questions in the Programming Support channel
Community in PD+ for REC Coaches
- Coaches can post your questions in the Coach PD+ Community
- Need help accessing PD+?
Contact the VEXcode Team
- Still running into an issue you can’t solve?
- Have an idea on how to make VEXcode better?
- Use the FEEDBACK button to provide comments, questions, and diagnostic information directly to the VEXcode team.
Use the CS Curriculum
Learn to code in Blocks and Python using the free VEX curriculum and activities.
Lessons include:
- Introduction and fundamentals
- Moving your robot
- Repeating behaviors
- Navigating a maze
- Detecting walls from a distance
- Decisions with colors
- Moving disks with loops
- Developing algorithms
Go to cs.vex.com, and check out the Activities and Resources while you are there!
VEX Visual Studio Code Extension
VEXcode is the recommended coding environment for VEX users as they start their journey learning to code. Students considering a career in coding, and who have become proficient in textual coding, will benefit from learning the tools used by professional coders. Microsoft’s Visual Studio Code is the tool of choice for 70% of professional coders worldwide. VEX has created an extension for Microsoft’s Visual Studio Code (VS Code) for this purpose.
VS Code is a feature-rich and extensible integrated development environment which is used by professionals everywhere to create production quality software. The VEX VS Code extension will allow users to use production quality tools seamlessly with VEX hardware. The source code to this extension is public, which will allow other users to build on top of what we have done to create new tools that they may find useful.
Extension Features
- VS Code compatible (version 1.66+)
- Windows and Mac OS compatible
- IQ (2nd Gen), EXP, and V5 compatible
- C++ and Python supported
- Updates VEX firmware
- IntelliSense for the VEX API
- Integrated help/documentation
- Imports projects from VEXcode
- Creates new projects from templates
- Hardware troubleshooting tools built in
Advantages When Compared to VEXcode
- Multi-file support for C++
- Version control integration (e.g., Git)
- Real time code collaboration with Live Share Extension
- Customizable interface
- User extensible with other VS Code Extensions
Learn more at vscode.vex.com