Lego Mindstorms EV3: LeJOS and Groovy - how to get started! - No Fluff Just Stuff

Lego Mindstorms EV3: LeJOS and Groovy - how to get started!

Posted by: Ryan Vanderwerf on July 29, 2014



I've recently given a workshop for Lego Workshop at Gr8Conf.eu and Gr8Conf.us this year showing how to integrate Groovy and Mindstorms together. I have slides available here, however they don't have a getting started (I pre-setup the robots and microSD cards before the workshop) tutorial: So how do I set  this up with my Lego EV3 I just ran home to buy after seeing this? Baruch Sadogursky (@jbaruch) asked me to write this post and and kindly offered to post the ISOs in Bintray so when people get home they are ready to roll with their Groovy Robots! (check back later for that link)

Step 1: Buy a Edimax 7811un wireless adapter like this one. They are less than $10USD on Amazon and Newegg. Likely you don't find these at the local store. They are very tiny and cause least amount of issues with building the robots.

Step 2: Get a 2GB or larger microsd card. Delete all of the partitions. Create 2 partitions (I use gparted on Linux):
1) 477 MB fat32 partition
2) 600 MB ext2 partition

Use the dd command in linux (I think this will work with MacOSX too).
dd if= lejos-part1-fat32-477mb-lba.iso.iso (Get this from bintray) /of=/dev/XXXX

where XXX=destination device partition  (mounted on your computer)

Also
dd if=lejos-part2-ext2-600mb.iso (Get this from bintray) /of=/dev/XXXX

where XXX=destination device partition  (mounted on your computer)

If you SD card is larger, you can expand the 600MB partition to fill your SD card if you like without much risk.

Step 3: Check out my lejos fork:
git clone git://git.code.sf.net/u/ryanv78665/lejos u-ryanv78665-lejos

Step 4: build the "EV3GroovyTest" file with the following command:
'gradlew ":EV3GroovyTest:jar"

Step 5: Boot robot up with the Edimax adapter and setup on your wifi network using the menu.

Step 6: scp the jar (under EV3GroovyTest/build/libs) to root@x.x.x.x:/home/lejos/tools(fastest) or  /home/lejos/samples or /home/lejos/programs (safest)

Step 7: if you want to tweak ev3classes libs or DBusJava you can build those with gradle too, and update the jars on the sd card via SCP if you'd like.

Follow the slides for more in depth info!

Webrover1 repo: https://github.com/rvanderwerf/webrover1/

Until Bintray URL is setup you can get these isos in the webrover1 project on github. Once that is ready I will update this page and remove them from the webrover project.

Happy Roboting! Thanks @ALittleOfJoe for the robot selfie pic from the US workshop! And @rappelg for the robot pic.

Ryan Vanderwerf

About Ryan Vanderwerf

Ryan is a member of the OCI Grails team. Formerly, he served as Chief Systems and Software Architect and Director of Products at ReachForce and Lead Architect at Developerprogram.com. He has helped maintain various Grails plugins, co-authored Effective Gradle Implementation, and is co-chair of the Groovy and Grails User Group in Austin,TX.

In the past, Ryan helped design and build a Grails and Groovy and AWS SaaS solution for Marketing Data Management. He also built a SaaS solution for Developerprogram.com that enables rapid deployment of Developer Program portals for companies specializing in the mobile industry. He has also built Java- and Linux-based webcasting for events, such as SXSW, telecom software, and SaaS systems for the financial sector.

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »