Download and install the Arduino Software
- The software is here: http://arduino.cc/en/Main/Software. Get the latest version. There are pre-compiled binaries for Mac, Windows, Linux-32 and Linux-64.
- I'm using a Mac. It's a DMG with the Arduino software, ready to drag into your Applications folder.
- There's also an enhanced FTDI USB driver. It's a package that installs using a password.
- This is a software project, and tidy housekeeping now will pay off handsomely in the end!
- I chose this as my base directory: $HOME/Dropbox/projects/ardupilot. I'll call this $TOP below.
- Later we'll set up a SVN checkout.
- For now we'll just unzip the Ardupilot and Arducopter distributions here. I'll save local copies of the zipfiles in $TOP/dist.
- From here: http://code.google.com/p/ardupilot-mega/downloads/list.
- The following is what I did from the mac command line... Adust to your favorite workflow.
- cd $TOP/dist
- From here: http://code.google.com/p/arducopter/downloads/list. I grabbed Arductopter RC2.zip.
- Download and unzip as per above notes.
- The most painful step in getting things set up is getting the libraries installed.
- Here's the biggest pain in the whole software setup. There might be a better way, but this is an area where the Arduino software could stand improving.
- Find your Sketchbook path.
- On mac:
grep sketchbook.path ~/Library/Arduino/preferences.txt
- Go to the sketchbook path just discovered.
- mkdir libraries, if it does not already exist
- cd to the libraries directory.
- copy all the folders in the ArduPilot project libraries directory here.
$ cp -rp ~/Dropbox/projects/ardupilot/1.0-BETA/libraries/* .
- restart the Arduino program. These libraries should now be available during compiliation.
- Start the Arduino program
- From the top menu, File/Sketchbook/libraries should show you the libraries you just copied, something like the screenshot below.
- Open the standard "blink" Arduino Demo: Menu: File / Examples/ 1.Basics / Blink
- Compile by pressing the "Verify" button.
- If that works, add the line
to the beginning of the file
- Compile again. If this works, your libraries have been installed.
- If it doesn't work, get ready to pull out lots of hair and gnash your teeth.
- start the Arduino system
- File/Load the main ArduPilot program, ArduPilotMega/ArduPilotMega.pde
- When you compile, you will get an error like this:
config.h:58:3: error: #error XXX You must define GPS_PROTOCOL in APM_Config.h
(ignore the Aduino environment highlighting, and scroll back in the error window to the beginning of the error messages. this is another area where the Aduino system could use some work.)
- Look in APM_Config. See where is says "READ THIS. REALLY! READ THIS."? Take that advice.
Build the Arducopter Software