adafruit-arduino-ide-setup
adafruit-arduino-ide-setup
https://learn.adafruit.com/adafruit-arduino-ide-setup
Overview 3
Linux Setup 20
Troubleshooting 20
• If you get the error message avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)
• If you get a lot of red text, errors and also a warning about Verification Failed
• On Linux if you get the error message "usbtiny_receive: error sending control message: Protocol error
(expected 4, got -71)"
This guide will walk you through how to install the Arduino IDE to work with Adafruit's
boards like Trinket, Pro Trinket, Gemma, and Flora. It's easy to program these boards
by downloading and installing a preconfigured version of the Arduino IDE. You'll be
up and running with your Adafruit board in minutes!
For most users follow the Arduino 1.6.x IDE install page (https://adafru.it/jDQ) to install
a version of the latest Arduino IDE.
For users who need an older version of the Arduino IDE follow the Arduino 1.0.x IDE
install page (https://adafru.it/jMe).
If you aren't sure what Arduino version you need stick with the latest 1.6.x
instructions (https://adafru.it/jDQ)!
And if you're new to using Arduino be sure to check out this Arduino tips and tricks
guide (https://adafru.it/maj), and the official Arduino documentation (https://adafru.it/
aMH).
After you have downloaded and installed the latest version (remember it must be
1.6.4 or higher), you will need to start the IDE and navigate to the Preferences menu.
You can access it from the File menu in Windows or Linux, or the Arduino menu on
OS X.
To find the most up to date list of URLs you can add, you can visit the list of third party
board URLs on the Arduino IDE wiki (https://adafru.it/f7U). We will only need to add
one URL to the IDE in this example, but you can add multiple URLS by separating
them with commas. Copy and paste the link below into the Additional Boards
Manager URLs option in the Arduino IDE preferences.
If you don't see the Additional Boards Manager URLs box, make sure you
downloaded the Arduino IDE from arduino.cc! Older versions and derivatives of
the IDE may not have it
https://adafruit.github.io/arduino-board-index/
package_adafruit_index.json
Click OK to save the new preference settings. Next we will look at installing boards
with the Board Manager.
Now that you have added the appropriate URLs to the Arduino IDE preferences, you
can open the Boards Manager by navigating to the Tools->Board menu.
Once the Board Manager opens, click on the category drop down menu on the top
left hand side of the window and select Contributed. You will then be able to select
and install the boards supplied by the URLs added to the prefrences. In the example
below, we are installing support for Adafruit AVR Boards, but the same applies to all
boards installed with the Board Manager.
Finally follow the steps below for your platform to finish the installation - basically
installing drivers and permissions management
Also check out the troubleshooting section (https://adafru.it/mal) for some advice on
common errors. Have fun using Adafruit's boards!
With the new version of the Arduino IDE the process of adding support for new
boards is much simpler than previous versions. First start by downloading a version
of the Arduino 1.6.x IDE and installing it as normal. Note that these instructions are
only tested to work against the Arduino 1.6.4+ IDE, earlier or later versions may or
may not work!
Once you've installed the stock Arduino IDE download and unzip the following file
which contains Adafruit's board definitions (https://adafru.it/eTY):
Unzip the file and navigate inside the Adafruit_Arduino_Boards folder to find a
hardware subfolder with a small hiearchy of files, and a drivers folder with Flora
drivers specific to Windows.
Next find your installed Arduino IDE's hardware subfolder. For Windows and Linux
the hardware subfolder should be directly beneath the folder where Arduino's IDE
was installed.
For Mac OSX the folder is hidden inside the application bundle. Right click on the
Arduino application and click 'Show Package Contents', then navigate to the Content
-> Java -> Hardware folder to find the hardware subfolder.
Once you've found Arduino's hardware subfolder carefully merge in the contents of
the hardware folder from Adafruit's board definitions, being sure to overwrite any file
that conflicts (only avrdude.conf should conflict). When you're done the Arduino
hardware folder should have the following hiearchy:
• hardware
◦ adafruit
▪ avr
◦ arduino
◦ tools
▪ avr
▪ etc
Finally on Windows only, copy the contents of the drivers folder from the board
definitions download into the Arduino IDE's drivers folder (it's a sibling of the
hardware folder you found earlier).
That's all you need to do to manually install Adafruit's boards with Arduino!
Now follow the steps below for your platform to finish the installation:
Also check out the troubleshooting section (https://adafru.it/mal) for some advice on
common errors. Have fun using Adafruit's boards!
Easy Installation
The easiest way to install the Arduino 1.0.x version IDE with support for Adafruit's
boards is with the following preconfigured downloads. Just grab the right file for your
platform and use it like the normal Arduino IDE. Adafruit's boards like Trinket, Pro
Trinket, Gemma, and Flora are configured to show up in the board list automatically!
Once you've downloaded and installed the IDE follow the steps below for your
platform to finish the installation:
Also check out the troubleshooting section (https://adafru.it/mal) for some advice on
common errors. Have fun using Adafruit's boards!
Manual Installation
If you have your own version of the Arduino IDE or would like to install the Adafruit
boards yourself then follow the steps below. However it is highly recommended that
most users stick to the easy install downloads above!
This tutorial will base the IDE off of v1.0.5. You can try later versions but v1.0.5 is at
least guaranteed to work
Adding Adafruit board support does not affect any other boards that are installed so
you can continue to use the IDE with any Arduino board currently supported.
Linux note: You can find instructions for manually modifying the Arduino IDE to
support Trinket/Gemma/Flora in the README of the Trinket Arduino Linux github
repository (https://adafru.it/dXd).
Unzip it and move the hardware folder from the zip file and place it into to your
Arduino sketchbook folder. Your sketchbook folder is the folder where the Arduino
IDE stores your sketches. This folder is automatically created by the IDE when you
install it. If this is your first time using the Arduino IDE, it will be empty!
On Linux machines, the folder is named "Sketchbook" and it is typically located in/
home/[username]
On Windows and Macintosh machines, the default name of the folder is "Arduino"
and is located in your Documents folder.
Now you can start (or restart the the IDE) and check the Tools->Board menu, you
should see the three new entries for Trinket and Gemma:
OK you are half done! Next is updating the avrdude configuration file.
The second step is to update the AVR chip program upload helper to be a little more
patient with the ATtiny85 bootloader we have on the Trinket. We will update the
description of the chip's erase cycle to be longer, to avoid timeouts and errors.
Windows users can download the new avrdude.conf by clicking this button:
On Linux download this version of the file and rename it to just avrdude.conf:
Now we will hunt for the original avrdude.conf file. If you are using a Mac, right-click
on the Arduino application icon and select “Show Package Contents” then navigate
through the Contents & Java folders. On Windows you will have to find the installation
directory, which may be a folder on the Desktop or possibly in C:\Program Files if you
used the installer. Likewise in Linux it is where-ever you uncompressed the folder.
Now find the hardware\tools\avr\etc folder, and inside you should see the
avrdude.conf file. You can also use your operating system's find tool to locate it.
Rename the old avrdude.conf to avrdude.bak and copy over the new avrdude.conf to
the same folder
There's a bug in the 'linker' used by Arduino on Mac & Windows, where you can't
make sketches that are larger than 4K on the Attiny85. Since its really likely you'll
make sketches this large, we suggest replacing it. It's a lot like replacing the
avrdude.conf
Now restart the Arduino IDE. If using Trinket or Gemma you are done with
setup! Now follow the steps below for your platform to finish the installation:
However if you're using Flora, continue on to setup the IDE for Flora.
flora8.name=Adafruit Flora
flora8.upload.protocol=avr109
flora8.upload.maximum_size=28672
flora8.upload.speed=57600
flora8.upload.disable_flushing=true
flora8.bootloader.low_fuses=0xff
flora8.bootloader.high_fuses=0xd8
flora8.bootloader.extended_fuses=0xcb
flora8.bootloader.path=caterina
flora8.bootloader.file=Caterina-Flora8.hex
flora8.bootloader.unlock_bits=0x3F
flora8.bootloader.lock_bits=0x2F
flora8.build.mcu=atmega32u4
flora8.build.f_cpu=8000000L
flora8.build.vid=0x239A
flora8.build.pid=0x8004
flora8.build.core=arduino
flora8.build.variant=flora
Adafruit_Flora.inf
https://adafru.it/eU5
pins_arduino.h
https://adafru.it/eU6
Caterina-Flora.hex
https://adafru.it/eU7
Then find
That's it, you're ready to start using Flora with Arduino 1.0.x! One last thing is to follow
the steps here for your platform to finish the intall:
Also check out the troubleshooting section (https://adafru.it/mal) for some advice on
common errors. Have fun using Adafruit's boards!
Windows 10 users probably can skip this step, because Windows 10 already has
many drivers built in. Try skipping the installation first to see if it's unnecessary.
Before you plug in your board, you'll need to possibly install a driver!
Select which drivers you want to install, we suggest selecting all of them so you don't
have to do this again!
The Trinket / Pro Trinket / Gemma / USBtinyISP drivers are also installed by default.
You can also, optionally, install the Arduino Gemma (different than the Adafruit
Gemma!), Huzzah and Metro 328 drivers.
Note that on Windows 10 and Windows 11, support for many boards is built in. If
you end up not checking any boxes, you don't need to run the installer at all!
And point windows to the Drivers folder when it asks for the driver location
Linux Setup
If you missed it on a previous page, the following link will let you download the latest
1.6.x version of the Arduino IDE for Linux:
If you're on Linux, and are seeing multi-second delays connecting to the serial
console, or are seeing "AT" and other gibberish when you connect, then the
modemmanager service might be interfering. Just remove it; it doesn't have
much use unless you're still using dial-up modems. To remove, type this
command at a shell:
Troubleshooting
If you get the error message avrdude: Error: Could not
find USBtiny device (0x1781/0xc9f)
That means the bootloader wasn't active. Make sure to press the button on the Trinket
to activate the bootloader before clicking the Upload button.