3 ms·
So... back in the day I cross-compiled GCC to write code for the original Mindstorms in C (and to some extent, in C++). That wasn't easy for my early-teen self,
by aristidb 14y ago
So... back in the day I cross-compiled GCC to write code for the original Mindstorms in C (and to some extent, in C++). That wasn't easy for my early-teen self, but it was possible.
To which degree is it possible to program Mindstorms NXT or EV3 in a "real" programming language?
- estel 14y agoI only briefly played with the NXT too, but I thought it was similarly C compatible? Having full control of the I/O over Bluetooth connected to an Android device (there's an SDK-ish thing for custom apps) was one of the better things.
- lgeek 14y agoI've used leJOS, an open-source jvm on NXT. It comes with libraries for sensors and actuators and it works quite well. http://lejos.sourceforge.net/ http://lejos.sourceforge.net/
- santaragolabs 14y agoI've used it on the RCX a year or five ago and back then leJOS didn't have any proper garbage collector implementation nor a proper way to free memory explicitly. Due to all my buddies only having Java knowledge we were forced to use leJOS and I ended up still having to write some C code and cross compile it in the leJOS JVM to get that all to work. A bit of a pain but fun and I learned lots.
- dschep 14y agoWas that using brickOS (previously legOS)? I always stuck to NQC since it was powerful enough for my (likewise) early-teen self but worked with the stock firmware.
- mikeash 14y agoI did a lot of stuff with brickOS when it was still legOS. I started out in NQC, but it just wasn't fast enough. I had a two-wheeled robot that did dead reckoning by counting wheel revolutions to figure out where it was in the room. NQC took about one second per navigation update. My robot was kind of hilarious running NQC, because it would jump forward and then stop for a second while it calculated the navigation update, then jump forward and stop again, etc. Using native C, I got the navigation update cost down to 10ms, allowing for smooth driving without having to stop and wait for calculations.
- darkxanthos 14y agoI used to have NXT 2.0 and you could do that. I'm not sure the possibilities for EV3. I can't even find it on sale. EDIT: Ahh... FTA "Lego expects to begin selling the product... this summer at a retail cost of $350."
- ja27 14y agoThere's RobotC for NXT. It's a little funky and runs $49 for a single user. http://www.robotc.net/download/nxt/ http://www.robotc.net/download/nxt/
- dfeltey 14y agoI teach RobotC to a FIRST robotics team, I really dislike it sometimes. The IDE is pretty bad, and only runs on Windows, and up until recently all variables in a RobotC program would implicitly be global. They fixed that with 3.5, and are aiming towards a more ANSI-C compliant implementation, but I still find it a pretty frustrating platform sometimes. http://www.robotc.net/blog/2012/10/24/robotc-3-5-global-vs-local-variables-and-the-debugger/ http://www.robotc.net/blog/2012/10/24/robotc-3-5-global-vs-l...
- throwaway1979 14y agoThere are Python bindings to communicate with the NXT brick ... aptly named PyNXT. The python doesn't run directly on the NXT brick so there is some additional latency that one has to deal with.
- cubicle67 14y agoWe have a NXT which we were able to programme in LUA. It had a very nice library and worked well, much easier than the visual block programming Edit: http://hempeldesigngroup.com/lego/pblua/nxtfunctiondefs/ http://hempeldesigngroup.com/lego/pblua/nxtfunctiondefs/
- stcredzero 14y agoLua, btw. I wonder if someone could package a nice Lua IDE for Mindstorms and charge $10 or $15 for it?