This is the program I made for the Mars Rover Challenge here: https://code.google.com/p/marsrovertechchallenge/