Note: The configuration instructions in this section explain how to alter the Arduino IDE so that it programs your controller using an ICSP rather than an Arduino bootloader. If you would rather use the bootloader, you should skip steps 2 – 4. You will still need to use an ICSP to initially load the bootloader onto your Orangutan or 3pi, and you will also need to obtain a USB-to-serial adapter or RS-232-to-TTL serial adapter through which the Arduino software can talk to the Arduino bootloader on your Orangutan. The Orangutan USB programmer can serve as such a USB-to-serial adapter if you switch the mode jumper. Be aware that the Baby Orangutan B-48 has an ATmega48 microcontroller, which lacks a bootloader section, meaning the B-48 version can only be programmed using an ICSP.
- Go to http://www.arduino.cc/en/Main/Software and download the latest Arduino software for your platform (Arduino 0012 as of this writing). Extract the files and run the Arduino IDE once to generate a preferences file (this will happen automatically when the program is first run). Close the Arduino IDE.
- Add the following to the end of the boards.txt file in the arduino-0012/hardware directory:
orangutan.name=Orangutan with Programmer
orangutan.upload.maximum_size=16384
orangutan.build.mcu=atmega168
orangutan.build.f_cpu=20000000L
orangutan.build.core=arduino
or replace your boards.txt file with this (3k txt).
This will add an Orangutan with Programmer option to the Tools > Board menu of the Arduino IDE. It accounts for the 20 MHz clock speed (standard Arduino boards run at 8 or 16 MHz) and bigger flash size (due to lack of an Arduino bootloader) on the Orangutans and 3pi.
Note: If you are using a Baby Orangutan B-48, you need to modify this new file entry slightly. The maximum upload size should be 4096 rather than 16384 and the build mcu should be atmega48 rather than atmega168.
- If you are using our Orangutan USB programmer, add the following to the end of the programmers.txt file in the arduino-0012/hardware directory:
avrispv2.name=AVR ISP v2
avrispv2.communication=serial
avrispv2.protocol=avrispv2
or replace your programmers.txt file with this (0k txt).
This will allow the Arduino IDE to program with the avrispv2 protocol used by our Orangutan USB programmer. If you have a different ICSP programmer, such as AVR ISP mkII, check to see if its protocol already exists in the programmers.txt file. If it doesn’t, add your programmer to the to the file by creating a new entry for it. For example:
mynewprogrammer.name=Whatever I want to call it
mynewprogrammer.communication=serial
mynewprogrammer.protocol=<insert protocol here>
- Edit your Arduino IDE’s preferences.txt file. You can find this file in the following location, depending on your platform:
- Windows: c:\Documents and Settings\<USERNAME>\Application Data\Arduino\preferences.txt
- Mac: /Users//Library/Arduino/preferences.txt
- Linux: ~/.arduino/preferences.txt
Note that the Application Data directory on the Windows platform is typically hidden, so you might need to edit your folder properties so that hidden files are displayed.
Open this file and replace the line upload.using=bootloader with:
- upload.using=avrispv2 if you are using the Orangutan USB programmer
- upload.using=avrispmkii if you are using the an AVR ISP mkII
- upload.using=mynewprogrammer if you are using something else you added to programmers.txt