# Program an AVR or Arduino Using Raspberry Pi GPIO ## Overview This is a short guide to explain how to program an AVR microcontroller (like what powers an Arduino Uno) directly from the GPIO pins on a Raspberry Pi. Why would you want to program an AVR from a Pi? If you're building up an AVR-based board or product from scratch you'll need some way to program code onto the chip. Typically dedicated tools like the [USBtinyISP](https://www.adafruit.com/products/46) are used to program an AVR through its in-circuit serial programming (ISP or ICSP) pins, however with the latest version of the avrdude programming tool you can actually use Linux GPIO pins to program an AVR directly--no dedicated programmer required! This guide will walk you through how to install and use avrdude to program an AVR microchip or Arduino through its ISP pins with a Raspberry Pi. Note that this tutorial is somewhat advanced and targeted at people who are familiar with programming an AVR chip directly instead of using friendlier tools like the Arduino IDE. It will help to be familiar with [setting up a breadboard Arduino](http://www.arduino.cc/en/Main/Standalone) and loading its bootloader through an ISP programmer. If you're a beginner or new to Arduino, stick with [using the Arduino IDE to program your board](../../../../lesson-0-getting-started/overview). To follow this guide you'll need the following hardware: - **Raspberry Pi** - Any model will work, but note that you need 4 GPIO pins free for each AVR that will be programmed at a time. - An **AVR chip & development board** or an **Arduino board** that exposes the ICSP pins (like an Arduino Uno). - **Breadboard and wires** to connect the ICSP pins of the AVR/Arduino to GPIO pins on the Raspberry Pi. - [Next Page](https://learn.adafruit.com/program-an-avr-or-arduino-using-raspberry-pi-gpio-pins/installation.md) ## Featured Products ### Raspberry Pi 2 - Model B v1.2 - ARM Cortex-A53 with 1G RAM [Raspberry Pi 2 - Model B v1.2 - ARM Cortex-A53 with 1G RAM](https://www.adafruit.com/product/2358) Didn't think the Raspberry Pi could get any better? You're in for a big surprise! The Raspberry Pi 2 Model B is out and it's amazing! With an upgraded ARM Cortex-A53 quad-core processor, Dual Core VideoCore IV Multimedia coprocessor, and a full Gigabyte of RAM, this... No Longer Stocked [Buy Now](https://www.adafruit.com/product/2358) [Related Guides to the Product](https://learn.adafruit.com/products/2358/guides) ### Assembled Pi Cobbler Plus - Breakout Cable [Assembled Pi Cobbler Plus - Breakout Cable](https://www.adafruit.com/product/2029) The Raspberry Pi B+ / Pi 2 / Pi 3 / Pi 4 has landed on the Maker World like a 40-GPIO pinned, quad-USB ported, credit card sized bomb of DIY joy. And while you can use most of our great Model B accessories by hooking up our [downgrade...](https://www.adafruit.com/product/1986) In Stock [Buy Now](https://www.adafruit.com/product/2029) [Related Guides to the Product](https://learn.adafruit.com/products/2029/guides) ### Adafruit METRO 328 Fully Assembled - Arduino IDE compatible [Adafruit METRO 328 Fully Assembled - Arduino IDE compatible](https://www.adafruit.com/product/50) We sure love the ATmega328 here at Adafruit, and we use them _a lot_ for our own projects. The processor has plenty of GPIO, Analog inputs, hardware UART SPI and I2C, timers and PWM galore - just enough for most simple projects. When we need to go small, we use a Out of Stock [Buy Now](https://www.adafruit.com/product/50) [Related Guides to the Product](https://learn.adafruit.com/products/50/guides) ### Arduino bootloader-programmed chip (Atmega328P) [Arduino bootloader-programmed chip (Atmega328P)](https://www.adafruit.com/product/123) This is a preprogrammed Atmega328P chip, useful if you want to make your own Arduino-compatible or repair a damaged chip on an exisiting Arduino UNO, Duemilanove, Diecimila, or NG! This chip is programmed with 'ADAboot', my version of the bootloader that is... Out of Stock [Buy Now](https://www.adafruit.com/product/123) [Related Guides to the Product](https://learn.adafruit.com/products/123/guides) ### Barebones AVR dev. board [Barebones AVR dev. board](https://www.adafruit.com/product/174) Discontinued - **you can grab** [Adafruit Metro Mini 328 - Arduino-Compatible - 5V 16MHz](https://www.adafruit.com/product/2590) **instead!** We took the business-card-sized AVR target board from Evil Mad Scientist Laboratories and added a few components to make an AVR... No Longer Stocked [Buy Now](https://www.adafruit.com/product/174) [Related Guides to the Product](https://learn.adafruit.com/products/174/guides) ### Adafruit 6-pin AVR ISP Breadboard Adapter Mini Kit [Adafruit 6-pin AVR ISP Breadboard Adapter Mini Kit](https://www.adafruit.com/product/1465) _Programming AVR? Always Googling the pinout? Well, now no longer!_ It's rare to find a mini kit so elegant, it deserves its own Haiku. A simple breakout, 2x3 box header in the center, two 1x3's on the side. Plugs into any breadboard for neat wiring (in... In Stock [Buy Now](https://www.adafruit.com/product/1465) [Related Guides to the Product](https://learn.adafruit.com/products/1465/guides) ### 6-pin Socket/Socket IDC cable [6-pin Socket/Socket IDC cable](https://www.adafruit.com/product/371) Connect this to that with an IDC cable! This cable has 6 pins (2x3) in 0.1"x0.1" spacing. Often used for programming AVRs. 6" long with two sockets crimped onto either side, they're quite sturdy! In Stock [Buy Now](https://www.adafruit.com/product/371) [Related Guides to the Product](https://learn.adafruit.com/products/371/guides) ## Related Guides - [Line Following Zumo Robot Using Simulink](https://learn.adafruit.com/line-following-zumo-robot-programmed-with-simulink.md) - [IR Sensor](https://learn.adafruit.com/ir-sensor.md) - [Metal Inlay Capacitive Touch Buttons](https://learn.adafruit.com/metal-inlay-capacitive-touch-buttons.md) - [Low Power Coin Cell Voltage Logger](https://learn.adafruit.com/low-power-coin-cell-voltage-logger.md) - [Digital Circuits 7: MCUs... how do they work?](https://learn.adafruit.com/mcus-how-do-they-work.md) - [2.8" TFT Touchscreen](https://learn.adafruit.com/2-8-tft-touchscreen.md) - [Smart Measuring Cup](https://learn.adafruit.com/smart-measuring-cup.md) - [Adafruit INA219 Current Sensor Breakout](https://learn.adafruit.com/adafruit-ina219-current-sensor-breakout.md) - [Wireless Power Switch with Arduino & the CC3000 WiFi Chip](https://learn.adafruit.com/wireless-power-switch-with-arduino-and-the-cc3000-wifi-chip.md) - [Speech Synthesis on the Raspberry Pi](https://learn.adafruit.com/speech-synthesis-on-the-raspberry-pi.md) - [Skill Badge Requirements: Microcontrollers](https://learn.adafruit.com/skill-badge-requirements-microcontrollers.md) - [Bluetooth Temperature & Humidity Sensor](https://learn.adafruit.com/bluetooth-temperature-and-humidity-sensor.md) - [Adafruit Ultimate GPS Logger Shield](https://learn.adafruit.com/adafruit-ultimate-gps-logger-shield.md) - [Arduino Lesson 3. RGB LEDs](https://learn.adafruit.com/adafruit-arduino-lesson-3-rgb-leds.md) - [2.2" TFT Display](https://learn.adafruit.com/2-2-tft-display.md)