First leJOS EV3 program
Okay, so this section isn't going to start off with a working example. But that's only because I've got something much more important to write about: A quick-fix for the ever-present microSD-card problem.
Way to get the microSD-card out again!
The original solution is found here, so all credit should go to JGeo.
sdCard Bottom |
Eventually I came to the conclusion that I'm not going to extract the card all that often, though. Transferring files via the wireless setup is actually pretty easy.
sdCard inserted in EV3 |
Actual testing
First off I tried to simply cram the required packages and classes into a shared project in order to force-feed the whole project to the EV3. In my mind it was a "quick" solution to test out the basics. In one word: Don't. I ended up wasting more time then I care to admit here.
After following the guide, I was able to actually make my EV3-leJOS work again (I broke it with my "quick" test). Setting up the development environment was pretty trivial. What did take some time, however, was upgrading my distribution of Ubuntu. Again, don't do that. 13.10 messes up all menu-related tasks for any java-program; hence my IDE (eclipse) was unusable. To keep this part of the rant to a minimal, this can be fixed with the following command (which disables the Unity-menu, and instead uses the built-in java menu for eclipse):
- Open up a terminal
- Write: "export UBUNTU_MENUPROXY=0" (this will disable said menu for anything launched from this terminal in this session. Returns to normal for any other terminal)
- Run eclipse: "eclipse"
Now, having fought myself though the literal jungle of obstruction in a single day, I was somewhat annoyed to get a NoClassDefFoundError when following the development guide section of the wiki. This error was mostly due to me needing a cup of coffee and the fact that I forgot to include the ev3classes project when exporting my project to the jar-file. So remember to both include the ev3classes for compile-time AND for export-time. The IDE is not smart enough to figure what might be available in a later execution environment.
Enough talk of failures, here is my amazing driving robot!
... okay, so not that impressive. But it's a running robot driven by leJOS on EV3, which was my goal all along. As far as I can see, the leJOS team seems to have ported most of the old framework (if not all?), and that at some of the sensors seem to be supported already.
Seeing as the sensors seem to be very similar to the old NXT-sensors, I would expect that most of them work. More experiments on that later on.
No comments:
Post a Comment