• Great solution for users familiar with JavaScript web programming.
• Powerful event-driven asynchronous programming – callbacks/events available on V5 motor rotate commands, sensors and touch LCD display.
• Use setTimeout/setInterval for delayed/repeated tasks.
• V5 JavaScript API documents here
• Example programs: Bump SensorCamera AimingDead ReckoningHolonomic, SimpleHolonomicArm Lifting with HoldLCD Feedback
• VCS Competition Template support with Competition class
o Callbacks and event handlers configured during the autonomous callback are cancelled upon switch to drivercontrol.
o JavaScript asynchronous programming is a different approach to real-time robotics coding. Therefore, using JavaScript for your program in VRC Turning Point is recommended only for experienced JS programmers.
Other new features
• RMS Python/JavaScript VM is downloaded separately from user programs, which results in faster program downloads as the VM is only downloaded once.
• V5 SD card support (in C++) use vex::sdcard methods, c stdio file functions, or c++ file streams
• V5 Motor open loop control, see vex::motor::spin with voltage parameter
• Eyes bitmaps now available for C++/Python and JavaScript
• Improvements to C++ Thread stack memory usage
• New V5 Battery methods: now read battery temperature, voltage and current
I used to do VEX almost three years ago back in high school. Now I’m at university and doing a lot of JavaScript development in my free time. I wish I had some v5 kits to play around with this library to easily make some code snippets for others to use! This library sounds fantastic!
@MGOD Like our other languages, you can build a simulated robot with our Mimic editor and program it with JavaScript. If you just wanted to play with it a bit.
I know this more difficult than lets on, but given we have C++ and Python, have you guys had discussions and thoughts about somehow getting a JVM on the V5 brain to allow Java programs to run?
Yes, we have had discussions, but no plans yet. We have some mimic improvements in the queue and continue to address programmer requests for coding improvements.
Unfortunately, the memory limitations on the Cortex (and VEX IQ Brain) make it difficult to port a JS runtime environment. The V5 Brain has a LOT more memory. This is not currently on our planned feature list.