forked from ArduPilot/ardupilot
-
Notifications
You must be signed in to change notification settings - Fork 2
Beginners Software Setup
Arthur Benemann edited this page Mar 15, 2013
·
1 revision
The Ardupilot software uses the Arduino environment to compile and download to the Ardupilot board. Here's how to set up the Arduino environment and build Ardupilot Mega and ArduCopter.
- The software is here: http://arduino.cc/en/Main/Software.
- Get the latest version for the OS you're working on.
- This is a software project, and tidy housekeeping now will pay off handsomely in the end!
- Choose a base directory for your ArduPilot projects. A good choice for a simple build is My Documents (windows) or Documents/ (mac).
- http://code.google.com/p/ardupilot-mega/downloads/list
- The filename will look something like: ArduPilotMega1.02.zip
- Unzip this into your Documents folder.
- http://code.google.com/p/arducopter/downloads/list
- The filename will look something like: Arductopter RC2.zip
- Unzip this into your Documents folder.
- Open the Arduino Properties menu and note the sketchbook location.
- (by default, this is something like My Documents/Arduino)
- In that folder, make sure there is a sub-folder called libraries.
- copy all the folders in ArduPilot/libraries to the subfolder.
- Do the same for ArduCopter software. There will be a couple of folders which are duplicated.
- restart the Arduino program. These libraries should now be available during compiliation.
- Start the Arduino program
- set the board type to Arduino Mega (ATmega1280) https://lh5.googleusercontent.com/-prbp5EBPDt0/TXhdulcCIqI/AAAAAAAAAdw/T4oVcgQJ9X0/s1600/ArduinoScreenSnapz001.png
- Open the standard "blink" Arduino Demo: File / Examples / 1.Basics / Blink
- Compile by pressing the "Verify" button.
- If that works, add the line "#include <FastSerial.h>" to the beginning of the file.
- Compile again. If this works, your libraries have been installed.
- If it doesn't work, pull out lots of hair, gnash your teeth, and let me know what you did to fix things.
- set the board type to Arduino Mega (ATmega1280)
- Load the main ArduPilot program, ArduPilotMega/ArduPilotMega.pde
- Edit APM_Config.h, and #define GPS_Protocol. If you are using the recommended beginner setup, you will have a MediaTek GPS and can just uncomment the #define line.
- Click the Verify button. If everything is working normally, the system should work for a while and give you a sketch size. Binary sketch size: 69446 bytes (of a 126976 byte maximum)
- Note that you may need to set other things in APM_Config. See where is says "READ THIS. REALLY! READ THIS."? Take that advice, but for now we're just making sure we can compile the project.
- set the board type to Arduino Mega (ATmega1280)
- Load the main ArduCopter program, ArduCopter/ArduCopterNG.pde
- Click the Verify button. If everything is working normally, the system should work for a while and give you a sketch size. Binary sketch size: 54816 bytes (of a 126976 byte maximum)