I've been assigned to a project aiming at programming Lego Mindstorms with JavaScript. However, I can't find many good resources regarding the use of JS with Mindstorms. Does anyone have any ?
Also, I don't really get how I can, for example, make the wheels turn using JS. From what I understood I need to use Node.js.
I've been assigned to a project aiming at programming Lego Mindstorms with JavaScript. However, I can't find many good resources regarding the use of JS with Mindstorms. Does anyone have any ?
Also, I don't really get how I can, for example, make the wheels turn using JS. From what I understood I need to use Node.js.
Share Improve this question edited Mar 17, 2018 at 13:06 Willi Mentzel 29.9k21 gold badges118 silver badges127 bronze badges asked Jun 8, 2015 at 11:01 Graham SlickGraham Slick 6,87011 gold badges56 silver badges92 bronze badges 6- I have no idea how to do this, but here is a link of a MATLAB implementation. Maybe you could use this as a starting point to see, what is necessary? mindstorms.rwth-aachen.de/trac/wiki/Download4.08 – rst Commented Jun 8, 2015 at 11:03
- 2 This question is, in my opinion, too broad. You should find your own way to move on and e back with a specific problem, such questions, in stackoverflow, are usually considered off topic, as far as i know. In any case, there seems to a large variety of nodejs APIs to control lego mindstorm ponents, but it's literally up to you to understand what kind of munication you want to use (either bluetooth or wireless or through cables). Nodejs is quite advanced in javascript in any case, you should first understand the basics of javascript syntax and mechanics first. – briosheje Commented Jun 8, 2015 at 11:10
- Also, for reference, you may take a look at this bricks.stackexchange./questions/679/… – briosheje Commented Jun 8, 2015 at 11:12
- A simple Google search will show you have at least 2 libraries for controlling Lego Mindstroms using Node.JS: EV3 (npmjs./package/ev3) and node-mindstorm-bt (github./davsebamse/node-mindstorm-bt) – Johnny Tordgeman Commented Jun 8, 2015 at 11:26
- 1 I had a general question on JS options for Mindstorms and Google brought this page as one of top results. This question has a good answer. This Q&A are useful to me, and not too broad IMO. It's a high level question that requires a high level answer. – Alex Commented Dec 2, 2015 at 16:53
2 Answers
Reset to default 7If you can use http://www.ev3dev/ as an alternative firmware, you can install and run node.js on the ev3. ev3dev is a debian linux based distribution and offers a wide range of packages.
One catch you will be stuck a node.js-0.10, since newer node.js (0.12) versions use a newer version of v8 (js engine) and that does not support the old arm-9 that runs the ev3 anymore (or more precisely it now requires vfp-3 that only arm-v7 cpus have).
Have you looked into Robot JavaScript. This is a Windows based piler downloaded from the Microsoft App Store that allows you to pile JavaScript directly into an EV3 robot for execution. No need to alter the EV3 operating system. This uses the Firmware from LEGO.