Robot Mesh Studio – now with JavaScript coding for V5

Now in beta, program the V5 (and V5 Mimics!) with JavaScript. Go online now at www.robotmesh.com/studio or included in the latest Desktop edition and rmbuild tool at www.robotmesh.com/desktop

JavaScript programminghttps://www.robotmesh.com/skin/frontend/base/default/images/RobotMesh/project-types/lang_javascript.png

• 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 Sensor Camera Aiming Dead Reckoning Holonomic, Simple Holonomic Arm Lifting with Hold LCD 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::brain::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

What will you code next?

2 Likes

RobotMesh is the MVP this season, hands down.

1 Like

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.

@John TYler Sounds great! Where can I find that? I took a brief look at the robotmesh site but it doesn’t come up very easily.

Edit: Nevermind, found it! Is there a way to import a pre-made robot or is the only way to build it in the editor?

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?

1 Like

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.

Any plans to implement JS for EDR?

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.

(somewhat old thread, I know)

This would actually require special hardware that is not present on the V5.

This would actually require special hardware that is not present on the V5.

Ah, I see. Yeah that makes sense. C++ with PROS is more than good enough for me.

1 Like