Tuesday, July 29, 2014

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



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! here is the download link https://t.co/PEqmSYZNoI

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/

Bintray repo for ISOs: https://t.co/PEqmSYZNoI

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

Friday, October 11, 2013

Installing LinuxMint or Ubuntu on my XPS 14 ultrabook - what worked for me

I've also done these same steps for other UEFI laptops like the newer ASUS machines. Other than the BIOS tweaks, the same pattern should work for most newer UEFI computers.

UEFI seemed like a great idea and first, but it sorted of hozed things for people who want to run open source systems like many Linux flavors who do not have the ability to get a secure boot key (read tax for people with money).  Read more about UEFI here.

 I just installed LinuxMint 15 on my refurb I just got from the 30% off sale at dell outlet. Everything works, I didn't need a special kernel to make the keyboard backlight controls working, or screen dimmer.

I downloaded the Ubuntu secure remix from here onto a usb stick.

Items needed: 2 usb sticks, one with Secure Ubuntu Remix, and the other with the linux flavor of your choice Go here http://sourceforge.net/projects/ubuntu-secured/ to get the image.


 Steps I did:

 1) Disable secure boot in bios, disable intel rapid start and caching. (My system has the 500gb + 32gb msata ssd)

2) boot into windows 8(newer machines with UEFI probably have windows 8 installed). Shrink partition down as low as it will go (it let me drop it down by 230gb or so). while holding down shift, click restart, keep holding it down until boot options appear, pick other/usb stick

3) ubuntu remix boots - click install, format 32gb ssd as target install, set boot loader to /dev/sda (it will default to that) to 500gb. It will make a grub partition there out of a small piece of free space

4) after reboot, ubuntu should boot. Go to boot repair icon it has, it pick auto-fix options. next reboot will give you a grub menu and let you choose UEFI loader or linux

5) both OSs should boot - At this point you can boot off another USB of your choice and replace the ubuntu install (I did linux mint) on the 32gb ssd.

After install, you'll have to manually add or download the boot repair tool again, it will fix grub so you can get both linux and windows After that I installed bumblebee to get my power consumption down to 15 watts or less. Before that its higher, as the nvidia 630 is always running. Everything works, battery life is good. Suspend/resume for me has not caused any issues yet, I've done it about 5 times today and wifi comes back and all. So far I am digging the machine!

 If you just want Linux installed and no Windows 8, in step 2, boot on the secure ubuntu image, and click on the icon for OS remover. You can then just erase the windows partition, then run boot repair and continue with rest of the steps.

 If you only have one hard disk, you'll just need to direct ubuntu to install on a new partition out of the free space on the drive you just made from either killing Windows or shrinking the partition. Tip: if you run a defrag util in windows first, you will be able to shrink the partition down more then as it comes. 

Good luck enjoying your new computer, free of Windows!

Thursday, July 25, 2013

My Gr8Conf.us 2013 Wrap Up

What a great year for the US Gr8Conf! It was so great meeting everyone again (and folks I had not met yet)for my 2nd year speaking. The weather the perfect, Shaun and his volunteers kept everyone running without a hiccup, talks were great, after hours events were fun. I was excited to share what I have learned with tech I have been working with lately in my talks. It was great to attend the talks as well, which such a good balance of different kinds of topics all related in some way to Grails or Groovy. What was also the benefit above all others, is to network with speakers and attendees. That's when the real world stuff comes out, problems people face, things people are trying, as well as talking with the committers themselves on many projects. Watching videos of talks is great (They recorded them this year to appear later on InfoQ), but actually GOING to these conferences (like Gr8, GGX, S2GX and others) and talking to people is where at least half the value lies. What I love about this community is everyone is approachable and humble, and helpful. I've never seen anyone act snobby or 'too good' to talk to anyone. I hope that attitude always continues, which is one of the many reasons I love this great community. Thank you sponsors OPI, Target, Bloom, and others for the wonderful events, food, and drinks. The hackathon was great, but if we had it so our API keys worked through the conference and turned our submissions morning of the last day, and possibly allow 4 person teams, even cooler stuff would come out. I personally had too elaborate of an idea, and I didn't come close to finish it for submission in 4 hours. Thanks Jeff Beck for the lovely beer gift and for our beverage ingredients, thanks to Rob Fletcher for our drink exchange. Thanks Luke for the Dave and Busters cards! If there is one thing I DEFINITELY learned, was that Dan fixed the Grails twitter notifier plugin - or something :) Hope to see everyone next year in Minneapolis!

Tuesday, March 26, 2013

Austin Groovy and Grails Meetup April 4!

Come meet up with the Austin Groovy and Grails User Group meetup @ Mister Tramps, April 4! http://www.meetup.com/Austin-Groovy-and-Grails-Users/events/110935792/ I will give a talk on clustering Quartz in Grails! (Same from gr8conf.us last year!). This event sponsored by New Iron. ( http://www.newiron.com

Monday, January 28, 2013

When GVM

Love GVM for switching between Grails versions. However my install in Ubuntu stopped working a few weeks ago and I've been puzzled ever since. If you run gvm, and it stops working where the command 'gvm' returns nothing, run this: source ~/.gvm/bin/gvm-init.sh then you can do 'gvm selfupdate' to bring it up to date. Working like a champ now! If you do Groovy/Grails/Griffon/Gradle/Vertx development and don't use GVM you should. Check it out at http://gvmtool.net/

Wednesday, October 24, 2012

AWS & VPC - OpenVPN setup with private subnets...

I have finally battled the beast of getting Openvpn set up on VPC to access both public AND private subnets. There is one thing not mentioned in any of the tutorials I found that is critical. When you install OpenVPN, and it is configured for NAT, it will use a private subnet for the vpn clients on 5.5.16.0/20, which you must add a route for under VPC-> route tables -> new -> destination -> 5.5.16.0/20 -> associate (enter your subnet ID) Now when clients VPN in with openVPN, they can contact everyone on both subnets. Don't forget to allow the traffic in using the security groups both inbound and outbound as well, such as ICMP ping, so you can test communications properly (and whatever services you need). helpful links: Using from linux: http://openvpn.net/index.php/access-server/docs/admin-guides/182-how-to-connect-to-access-server-with-linux-clients.html video tutorial (great, except the route part is missing) http://dbsgkhvbz3k7m.cloudfront.net/AmazonVPC/AmazonVPC.html happy routing!

Thursday, October 18, 2012

SpringOne2GX Wrap up

Great conference this year, it was very good to see some familiar faces and finally meet more in person. I hope my talks where useful to everyone! The big takeaway I got is Grails is moving to be more client capable and more social with the new platform core event bus technology as well as more mobile (jquery-mobile-scaffolding). Less and less are MVC types of systems being relevant with such rich Javascript and HTML5 capabilities of browsers. Users expectations are changing to rich client interfaces, single page apps, and quick deployments as well. Plugins are more important that ever, and user plugin contributions are one of the big things that make Grails so great. Also if weren't for all of the advancements with Groovy and Spring libraries Grails wouldn't be what it is today. Another thing I like about the Grails, Groovy, and Spring teams is every is so friendly, helpful, and willing to chat with everyone - that makes it feel like a big family even to outsiders to Springsource. Of course Jay Zimmerman is the master of these conferences, everything was so well done, professional, and smooth. I've uploaded sample apps to my github account at https://github.com/rvanderwerf and if you look in the doc folders it will include PDFs of my slides as well. During the conference I release a new version of the struts1 plugin to work with Grails2 th made numerous improvements to the GVPS (Grails Video Pseudo Streamer) plugin as well. You can go to http://www.grails.org/plugin/gvps to see the latest version. Special thanks and shoutouts goes out to Burt Beckwith, Sebastian Blanc, Soren Glasius, Peter Ledbrook, Colin Harrington, Cedric Champeau, Luke Daley, Graeme Rocher, Jeff Brown, Stefan Ambruster, Guillaume Laforge, Jay Zimmerman and everyone else who shared drinks and conversation. I especially want to thank those who attended my talks. I hope to see everybody next year, wherever it is at! Also according to Peter Ledbrook and S0ren Glasius, everytime someone calls Grails 'Groovy on Grails', a puppy dies ;)